Skip to content

quic: handle stream writer reset error - #64305

Closed
yashshinde8585 wants to merge 1 commit into
nodejs:mainfrom
yashshinde8585:fix-quic-stream-writer-error
Closed

yashshinde8585 wants to merge 1 commit into
nodejs:mainfrom
yashshinde8585:fix-quic-stream-writer-error

Conversation

@yashshinde8585

Copy link
Copy Markdown

Summary

This PR addresses an unhandled promise rejection that can occur when a QuicStream writer is reset by the remote peer.

Changes

  • Mark the internal drain promise as handled before rejecting it.
  • Forward the stream error through the appropriate error callback.
  • Add a regression test covering the reported scenario.

Testing

  • Added a regression test:
    • test/parallel/test-quic-stream-writer-unhandled-error.mjs

Fixes: #64290

@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 Jul 5, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@jasnell

jasnell commented Jul 6, 2026

Copy link
Copy Markdown
Member

there appears to be a lint issue in this...

---
data:
  column: 11
  line: 38
  ruleId: no-restricted-syntax
message: '`assert.rejects()` must be invoked with at least two arguments.'
messages:
- data:
    column: 7
    line: 50
    ruleId: no-restricted-syntax
  message: '`assert.rejects()` must be invoked with at least two arguments.'
  severity: error
severity: error
...

@jasnell jasnell added this to QUIC Team Aug 8, 2026
@jasnell jasnell moved this to In Progress in QUIC Team Aug 8, 2026
@jasnell jasnell moved this from In Progress to Ready for Review in QUIC Team Aug 8, 2026
@trivikr

trivikr commented Aug 20, 2026

Copy link
Copy Markdown
Member

@yashshinde8585 Can you please fix the lint issue, and sign the first commit?

@jasnell

jasnell commented Sep 6, 2026

Copy link
Copy Markdown
Member

ping @yashshinde8585 ... are you still interested in moving this forward?

@MikeMcC399

Copy link
Copy Markdown
Member

Since this PR's branch is now a long way behind the main branch, it should be rebased.

Refer to the rebase section in the Pull requests documentation.

@MikeMcC399

Copy link
Copy Markdown
Member

@yashshinde8585

Are you still interested in this PR? It would need rebasing to resolve a new conflict.

@Ethan-Arrowood

Ethan-Arrowood commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Thank you @yashshinde8585 for finding the cause, the unhandled drain promise, and the regression test. I'm going to close this now because I believe the same fix landed in #65319 which closed #64290.

You're welcome to reopen or submit a new PR if something in this one isn't covered by #65319.

Thanks again!

AI-assisted (Claude Opus 5.5, my setup). The words are my own, per the Human Voice policy.

@github-project-automation github-project-automation Bot moved this from Ready for Review to Done in QUIC Team Nov 12, 2026
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

Status: Done

Development

Successfully merging this pull request may close these issues.

quic: QuicStream writer creates unhandled error

7 participants