Skip to content

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

Closed

Description

@karpetrosyan

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.

Activity

  1. changed the title [-]Handle unstarted HTTP/2 requests gracefully[/-] [+]Handle failed HTTP/2 requests gracefully[/+] on Jul 14, 2023
  2. changed the title [-]Handle failed HTTP/2 requests gracefully[/-] [+]Ensure HTTP/2 connections are gracefully closed on cancellation[/+] on Jul 15, 2023
  3. changed the title [-]Ensure HTTP/2 connections are gracefully closed on cancellation[/-] [+]Ensure HTTP/2 connections are gracefully closed on async cancellation[/+] on Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions