Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a connection reuse race #191

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

patrickbkr
Copy link
Contributor

@patrickbkr patrickbkr commented Jan 27, 2024

HTTP1.1 connection reuse is subject to a race condition where remote connection tear down races with reusing the connection for a new request. This change wires HTTP1.1 into the same request retry mechanism HTTP2 uses.

HTTP2 was subject to the same race. I updated the PR respectively.

@patrickbkr patrickbkr changed the title Implement retrying for HTTP1.1 as well Fix a connection reuse race Jan 28, 2024
Connection reuse is subject to a race condition where remote connection
tear down races with reusing the connection for a new request. There were
already locks in place for access to `$!next-response-vow` /
`%!outstanding-stream-responses` but the lock didn't cover the check for
`$!dead`, thus it was possible for the dead check to succeed, the
connection being torn down and only then the next response vow to be taken.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant