Skip to content

Fix WebTransport session cleanup - #69708

Merged
BrennanConroy merged 2 commits into
mainfrom
brennanconroy-bound-webtransport-streams
Oct 13, 2026
Merged

BrennanConroy merged 2 commits into
mainfrom
brennanconroy-bound-webtransport-streams

Conversation

@BrennanConroy

Copy link
Copy Markdown
Member

Fix WebTransport session cleanup

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.

Summary of the changes (Less than 80 chars)

Description

Fixes WebTransport session cleanup.

  • Remove a WebTransportSession from Http3Connection when it closes gracefully or aborts.
  • Snapshot sessions before connection-wide cleanup so session removal does not mutate an active enumeration.
  • Add coverage for graceful and aborted session cleanup.

Fixes N/A

Copilot AI balanced review requested due to automatic review settings October 7, 2026 21:02
@github-actions github-actions Bot added the area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions label Oct 7, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Late streams referencing removed sessions can trigger connection-wide cleanup and abort unrelated requests.

1 open finding
What changed in this PR

Fixes WebTransport session cleanup in Kestrel’s HTTP/3 connections.

Changes:

  • Removes sessions when they close or abort.
  • Snapshots sessions before connection-wide cleanup.
  • Adds coverage for session removal.
File Description
src/​Servers/​Kestrel/​test/​InMemory.FunctionalTests/​Http3/​WebTransport/​WebTransportSessionTests.cs Tests graceful and aborted session removal.
src/​Servers/​Kestrel/​Core/​src/​Internal/​WebTransport/​WebTransportSession.cs Removes closed sessions from their connection.
src/​Servers/​Kestrel/​Core/​src/​Internal/​Http3/​Http3Connection.cs Adds removal, snapshot, and test-count helpers.

🧠 Review effort: Balanced

@BrennanConroy
BrennanConroy merged commit 03c314b into main Oct 13, 2026
29 checks passed
@BrennanConroy
BrennanConroy deleted the brennanconroy-bound-webtransport-streams branch October 13, 2026 17:21
@github-actions

Copy link
Copy Markdown
Contributor

✅ No documentation PR was created.

Confidence that documentation is needed: 5%

No docs needed: internal bug fix for WebTransport session cleanup, with tests. No signals detected.

Documentation surfaces considered

  • Conceptual article: Not required — Internal Kestrel files only; no public API or documented behavior change.
  • Migration guidance: Not required — No user action needed when upgrading.
  • Breaking change: Not required — No compatibility impact; internal cleanup fix.

This branch was previously deployed

1 inactive deployment
copilot-pat-pool — a3d5eb5e Deployed Oct 13, 2026 by BrennanConroy via conclusion #32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants