-
Notifications
You must be signed in to change notification settings - Fork 106
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
Ensure HTTP/2 connections are gracefully closed on async cancellation #757
base: master
Are you sure you want to change the base?
Ensure HTTP/2 connections are gracefully closed on async cancellation #757
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could (async )with self._state_lock:
move under _state_housekeeping
function?
I agree, it's always used. |
At thanks! The failing test case is especially helpful here. Pretty sure this resolution is overcomplicated, tho. I think we actually want here is?...
httpcore/httpcore/_async/http2.py Lines 106 to 113 in 21e47a7
...so that it instead covers all of this block... httpcore/httpcore/_async/http2.py Lines 106 to 127 in 21e47a7
ie. the
httpcore/httpcore/_async/http2.py Line 129 in 21e47a7
Should also be surrounded with... try:
await self._max_streams_semaphore.acquire()
except BaseException as exc:
with AsyncShieldCancellation():
await self.aclose()
raise exc We could actually avoid (1) if we instead addressed the refactoring suggested in #738 or refactored |
Ugh. I need to think about this one more clearly, it's making my brain mush. |
I would recommend using this stupid solution for the time being and not waiting for http/2 refactoring from #770 |
Closes #756
Checklist
TODO