Do not ignore payload size in sync client (#194)

This commit is contained in:
Yechan Bae
2018-08-12 10:39:20 -07:00
committed by Tim
parent 92f157206d
commit 0ecc7a80c1

View File

@@ -106,7 +106,7 @@ impl Into<FutureOptions> for (reactor::Handle, Options) {
#[cfg(feature = "tls")]
fn into(self) -> FutureOptions {
let (handle, options) = self;
let mut opts = FutureOptions::default().handle(handle);
let mut opts = FutureOptions::default().max_payload_size(options.max_payload_size).handle(handle);
if let Some(tls_ctx) = options.tls_ctx {
opts = opts.tls(tls_ctx);
}
@@ -115,8 +115,8 @@ impl Into<FutureOptions> for (reactor::Handle, Options) {
#[cfg(not(feature = "tls"))]
fn into(self) -> FutureOptions {
let (handle, _) = self;
FutureOptions::default().handle(handle)
let (handle, options) = self;
FutureOptions::default().max_payload_size(options.max_payload_size).handle(handle)
}
}