Ensure h2 connection gets closed in case of exception#253
Merged
Conversation
|
Doesn't work with the new version of httpcore. |
Contributor
|
@frankwalter1301 Could you give some more background about why you're bumping into this? |
|
I simple encountered the same error as the issue linked to this talks
about. Same circumstances: too many failed connections in the same http
client.
Il mar 16 nov 2021, 12:15 Tom Christie ***@***.***> ha
scritto:
… @frankwalter1301 <https://github.com/frankwalter1301> Could you give some
more background about why you're bumping into this?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#253 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOMI7TKTVHOBUR7P2S2SQJDUMI4L7ANCNFSM4UYPAXVA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Contributor
|
Believe that #440 is what we need to close encode/httpx#1414, but yes! this is a good and sensible bit of defensive programming, and we should have it in. |
Merged
2 tasks
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.
May close encode/httpx#1414
Tweaks our HTTP/2 connection implementation so that the underlying
h2_stateis properly closed before bubbling up any exceptions.Right now it seems possible for the underlying state to leak eg if the connection gets lost unexpectedly — see: https://github.com/encode/httpx/issues/1414#issuecomment-742127990