From 94c022480d3e98c64693ca8026ef302732a6edf5 Mon Sep 17 00:00:00 2001 From: hatoo Date: Tue, 23 Jul 2024 12:32:18 +0900 Subject: [PATCH] [http2] set windows size to nghttp2's default Note: adaptive window will automatizally disabled when we set window sizes --- src/client.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/client.rs b/src/client.rs index 24284264..0a4a8826 100644 --- a/src/client.rs +++ b/src/client.rs @@ -258,7 +258,10 @@ impl Stream { } async fn handshake_http2(self) -> Result { let mut builder = hyper::client::conn::http2::Builder::new(TokioExecutor::new()); - builder.adaptive_window(true); + builder + // from nghttp2's default + .initial_stream_window_size((1 << 30) - 1) + .initial_connection_window_size((1 << 30) - 1); match self { Stream::Tcp(stream) => {