-
Notifications
You must be signed in to change notification settings - Fork 719
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
h3: earlier check for control stream finished
A peer can FIN a control stream at any point during the stream lifetime. While doing so is an error in HTTP/3, our handling before this change was a bit odd. Previously, depending on the sequencing, an unexpected FIN could trigger an InvalidStreamState error when attempting to read from a control stream. This would bubble up to an app via poll(), which is weird and unexpected because the quiche h3 layer is supposed to deal with all the control stream details. A subsequent poll() would then cause the finished detection to kick in and enforce the RFC rules to close the connection with CloseCriticialStream. However, that's a bit late and clunky. This change adds additional checks for the stream finished event in order to make sure we close connections at the earliest time and prevent useless errors getting bubbled up to apps.
- Loading branch information
Showing
1 changed file
with
74 additions
and
20 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