Skip to content

quic: do not reset streams when destroying with a close code - #67349

Open
manusingh090 wants to merge 1 commit into
nodejs:mainfrom
manusingh090:quic-close-no-stream-reset
Open

manusingh090 wants to merge 1 commit into
nodejs:mainfrom
manusingh090:quic-close-no-stream-reset

Conversation

@manusingh090

Copy link
Copy Markdown

session.destroy() with a close code sends a CONNECTION_CLOSE, which ends every open stream along with the connection (RFC 9000, Section 10.2). Destroying each stream first sent a RESET_STREAM (and, with an error, STOP_SENDING) for it, so the peer saw its streams fail with an unrelated error code before it learned how the session closed.

Skip the per-stream frames while the session is ending its streams with a CONNECTION_CLOSE, either from destroy() with a close code or from an immediate close in the native layer.

Fixes: #67278
Assisted-by: a coding agent

session.destroy() with a close code sends a CONNECTION_CLOSE, which
ends every open stream along with the connection (RFC 9000, Section
10.2). Destroying each stream first sent a RESET_STREAM (and, with an
error, STOP_SENDING) for it, so the peer saw its streams fail with an
unrelated error code before it learned how the session closed.

Skip the per-stream frames while the session is ending its streams
with a CONNECTION_CLOSE, either from destroy() with a close code or
from an immediate close in the native layer.

Fixes: nodejs#67278
Assisted-by: a coding agent
Signed-off-by: Manjeet Singh <024manjeetsingh@gmail.com>
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/quic

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. quic Issues and PRs related to the QUIC transport implementation. labels Nov 8, 2026
@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Welcome to Node.js, and thank you for your first contribution!

Before review, please take a moment to read:

Please make sure every commit is signed off. For a first pull request, GitHub Actions require collaborator approval and Jenkins CI must be started by a collaborator or triager, so an initial wait is normal.

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

Labels

needs-ci PRs that need a full CI run. quic Issues and PRs related to the QUIC transport implementation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

quic: session.close()/destroy() send RESET_STREAM for every open stream before CONNECTION_CLOSE

2 participants