Repository navigation
fix(client): fail parked h2 request with connection error on close - #4275
Open
bunnysayzz wants to merge 1 commit into
Open
bunnysayzz wants to merge 1 commit into
bunnysayzz wants to merge 1 commit into
Conversation
When the h2 connection drops while a request is still waiting for a stream slot, the parked callback was left to drop, and the caller got a misleading DispatchGone user error. Fail it with the connection error instead: canceled on a clean GOAWAY, the h2 reason otherwise. Adds a regression test with a server that only allows one concurrent stream and closes while the second request is parked. Fixes hyperium#4269
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When the h2 connection goes away while a request is waiting for a stream to open, the parked callback was never failed. It fell through to Callback::drop, so the caller saw a DispatchGone user error instead of the connection error.
Fail the parked callback in the poll_ready error branch instead: canceled on a clean GOAWAY, the h2 reason otherwise. The original error is still returned from the task.
Adds a regression test with a server that allows one concurrent stream and closes while the second request is parked. The test fails before this change with User(DispatchGone) and passes after.
Fixes #4269