From 80e3478c00a670234e52f5d20a555543a74ec327 Mon Sep 17 00:00:00 2001 From: Oliver Gould Date: Mon, 9 Oct 2017 15:16:22 -0700 Subject: [PATCH] Use remote window size for send flow control (#145) The initial window size of both the send and recv flow controllers are configured from the same setting. The send flow controller should be configured from the remote's initial window size. --- src/proto/streams/prioritize.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/proto/streams/prioritize.rs b/src/proto/streams/prioritize.rs index 59f0b71..502d8e6 100644 --- a/src/proto/streams/prioritize.rs +++ b/src/proto/streams/prioritize.rs @@ -51,11 +51,11 @@ where pub fn new(config: &Config) -> Prioritize { let mut flow = FlowControl::new(); - flow.inc_window(config.local_init_window_sz) + flow.inc_window(config.remote_init_window_sz) .ok() .expect("invalid initial window size"); - flow.assign_capacity(config.local_init_window_sz); + flow.assign_capacity(config.remote_init_window_sz); trace!("Prioritize::new; flow={:?}", flow);