Skip to content

fix(connection): reject pending callbacks on transport death - #3170

Open
Simon Knott (Skn0tt) wants to merge 1 commit into
microsoft:mainfrom
Skn0tt:skn0tt-connection-error-callback-cancel
Open

fix(connection): reject pending callbacks on transport death#3170
Simon Knott (Skn0tt) wants to merge 1 commit into
microsoft:mainfrom
Skn0tt:skn0tt-connection-error-callback-cancel

Conversation

@Skn0tt

Copy link
Copy Markdown
Member

Every send used to race the protocol callback against transport.on_error_future, because a dead pipe only completed that future and never tore down in-flight calls.

This matches the Node client more closely: Connection.run() calls cleanup() when the transport ends, which rejects every pending callback. Sends just await their own future.

For remote connect, browser._on_close is still call_soon'd before cleanup(), so waiters still see reject-before-disconnect ordering.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3351313b-bb35-475c-ae04-f79e1d2e4086
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