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.
This commit is contained in:
committed by
Sean McArthur
parent
4c7ecf158d
commit
80e3478c00
@@ -51,11 +51,11 @@ where
|
|||||||
pub fn new(config: &Config) -> Prioritize<B, P> {
|
pub fn new(config: &Config) -> Prioritize<B, P> {
|
||||||
let mut flow = FlowControl::new();
|
let mut flow = FlowControl::new();
|
||||||
|
|
||||||
flow.inc_window(config.local_init_window_sz)
|
flow.inc_window(config.remote_init_window_sz)
|
||||||
.ok()
|
.ok()
|
||||||
.expect("invalid initial window size");
|
.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);
|
trace!("Prioritize::new; flow={:?}", flow);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user