Skip to content

fix(http2): cancel pending-open requests when closing the connection - #4254

Open
grahamc wants to merge 2 commits into
hyperium:masterfrom
grahamc:h2-pending-open-canceled
Open

grahamc wants to merge 2 commits into
hyperium:masterfrom
grahamc:h2-pending-open-canceled

Conversation

@grahamc

@grahamc grahamc commented Oct 31, 2026 •

Copy link
Copy Markdown

Many times a day I see an error with a webservice that talks to another webservice over HTTP2:

Middleware(error sending request for url (...)

Caused by:
    0: client error (SendRequest)
    1: dispatch task is gone
    2: runtime dropped the dispatch task)

With the help of an LLM I was able to create a very reliable reproducer and produce the patch and test in this PR. The patch appears to solve the issue, though I have not tried it in production yet.

A request parked in ClientTask while its stream is pending open was dropped
when poll_ready failed, which reported DispatchGone instead of Canceled.
@grahamc grahamc changed the title H2 pending open canceled fix(http2): cancel pending-open request when closing the connection Oct 31, 2026
@grahamc grahamc changed the title fix(http2): cancel pending-open request when closing the connection fix(http2): cancel pending-open requests when closing the connection Oct 31, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant