-
-
Notifications
You must be signed in to change notification settings - Fork 400
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix stopped recv stream flow control underflow under reordering
If frames are received out of order (e.g. due to packet loss) on a stopped stream, the local `end` might be less than the high water mark `Recv::end`. The previous code would set `Assembler::bytes_read` to that incorrect lower value, potentially after it had previously taken a higher value. If `MAX_STREAM_DATA` frames are then queued for that stream (e.g. due to retransmits prompted by packet loss), we might attempt to transmit a smaller flow control credit than we had previously. This would cause an underflow in the subtraction used to judge whether an increase in flow control credit is worth sending, and violates the spec besides. Because additional data on a stopped stream isn't useful, there's no benefit to updating stream-level flow control at all, so we might as well remove that path entirely. Connection-level flow control is still maintained at the StreamsState level based on change in the stream's high-water mark or determination of the final offset.
- Loading branch information
Showing
3 changed files
with
105 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters