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!