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

Ensure HTTP/2 connections are gracefully closed on async cancellation #756

Closed
1 task done
karpetrosyan opened this issue Jul 14, 2023 · 0 comments · Fixed by #803 · May be fixed by #757
Closed
1 task done

Ensure HTTP/2 connections are gracefully closed on async cancellation #756

karpetrosyan opened this issue Jul 14, 2023 · 0 comments · Fixed by #803 · May be fixed by #757
Labels
bug Something isn't working

Comments

@karpetrosyan
Copy link
Member

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.

@karpetrosyan karpetrosyan changed the title Handle unstarted HTTP/2 requests gracefully Handle failed HTTP/2 requests gracefully Jul 14, 2023
@karpetrosyan karpetrosyan added the bug Something isn't working label Jul 14, 2023
@karpetrosyan karpetrosyan changed the title Handle failed HTTP/2 requests gracefully Ensure HTTP/2 connections are gracefully closed on cancellation Jul 15, 2023
@tomchristie 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
@tomchristie tomchristie mentioned this issue Sep 6, 2023
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant