You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue is that some HTTP/2 connections can fail and not be cleaned up, resulting in our connection being in a broken state.
When the asynchronous semaphore acquisition is cancelled, our handle_request method propagates the exception and never calls clean up.
The first step, as always, will be to write a failing test, but in this case that will be difficult because we need to mock the AsyncSemaphore object, more specifically, we want the acquisition method to be extremely slow.
Let's use monkeypatching to write a failing test with no complex changes, and then we can change that failing test if we want.
The text was updated successfully, but these errors were encountered:
karpetrosyan
changed the title
Handle unstarted HTTP/2 requests gracefully
Handle failed HTTP/2 requests gracefully
Jul 14, 2023
karpetrosyan
changed the title
Handle failed HTTP/2 requests gracefully
Ensure HTTP/2 connections are gracefully closed on cancellation
Jul 15, 2023
tomchristie
changed the title
Ensure HTTP/2 connections are gracefully closed on cancellation
Ensure HTTP/2 connections are gracefully closed on async cancellation
Sep 6, 2023
The issue is that some HTTP/2 connections can fail and not be cleaned up, resulting in our connection being in a broken state.
When the asynchronous semaphore acquisition is cancelled, our
handle_request
method propagates the exception and never calls clean up.The first step, as always, will be to write a failing test, but in this case that will be difficult because we need to mock the
AsyncSemaphore
object, more specifically, we want the acquisition method to be extremely slow.Let's use
monkeypatching
to write a failing test with no complex changes, and then we can change that failing test if we want.The text was updated successfully, but these errors were encountered: