Immediately apply initial window size to streams

The initial window size should be applied to streams once they leave the
IDLE state.
This commit is contained in:
Carl Lerche
2017-08-24 11:03:33 -07:00
parent 66dbde92ef
commit 6a6c9665cd
6 changed files with 69 additions and 21 deletions

View File

@@ -162,6 +162,11 @@ impl<B> Prioritize<B>
stream: &mut store::Ptr<B>)
-> Result<(), ConnectionError>
{
// Ignore window updates when the stream is not active.
if !stream.state.could_send_data() {
return Ok(());
}
// Update the stream level flow control.
stream.send_flow.inc_window(inc)?;
@@ -219,6 +224,8 @@ impl<B> Prioritize<B>
return;
}
// If the stream has requested capacity, then it must be in the
// streaming state.
debug_assert!(stream.state.is_send_streaming());
// The amount of currently available capacity on the connection