Fix send flow control bug

The send stream state is transitioned before data is buffered. As such,
the stream state could be closed while there is still data to be sent.
This commit is contained in:
Carl Lerche
2017-08-25 07:07:21 -07:00
parent 63ba0073a4
commit 0c8a94aa11
5 changed files with 20 additions and 23 deletions

View File

@@ -23,6 +23,7 @@ pub(super) struct Stream<B> {
pub requested_send_capacity: WindowSize,
/// Amount of data buffered at the prioritization layer.
/// TODO: Technically this could be greater than the window size...
pub buffered_send_data: WindowSize,
/// Task tracking additional send capacity (i.e. window updates).