From 8fad30a4b1a6f6624e3792fa75b2b33ce67fd196 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Tue, 2 Jul 2019 07:09:46 +0200 Subject: [PATCH] use latest hyper master branch to include socket buffer size fix --- Cargo.toml | 2 ++ src/client/http_client.rs | 1 + 2 files changed, 3 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index f01f2e15..54e526fe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -57,3 +57,5 @@ valgrind = ["valgrind_request"] [replace] "zstd-sys:1.4.10" = { path = "zstd-sys" } +# include socket buffer size fix +"hyper:0.12.31" = { git = "https://github.com/hyperium/hyper.git" } diff --git a/src/client/http_client.rs b/src/client/http_client.rs index 3e5750e2..d4903c0c 100644 --- a/src/client/http_client.rs +++ b/src/client/http_client.rs @@ -163,6 +163,7 @@ impl HttpClient { let tlsconnector = builder.build().unwrap(); let mut httpc = hyper::client::HttpConnector::new(1); httpc.set_nodelay(true); // important for h2 download performance! + httpc.set_recv_buf_size(Some(1024*1024)); //important for h2 download performance! httpc.enforce_http(false); // we want https... let mut https = hyper_tls::HttpsConnector::from((httpc, tlsconnector)); https.https_only(true); // force it!