Skip to content

http2: submit RST_STREAM before emitting 'aborted' - #66314

Open
lazerg wants to merge 1 commit into
nodejs:mainfrom
lazerg:fix/issue-66306-http2-aborted-rst
Open

lazerg wants to merge 1 commit into
nodejs:mainfrom
lazerg:fix/issue-66306-http2-aborted-rst

Conversation

@lazerg

@lazerg lazerg commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

closeStream() emitted 'aborted' before submitting RST_STREAM. If an 'aborted' listener destroyed the stream (stream.pipeline() does this on its own), _destroy() skipped its RST because the stream was already marked closed, then destroyed the handle, so the later submitRstStream() found no handle and nothing was sent. The peer's stream stayed open until the session closed.

This emits 'aborted' after the RST_STREAM has been submitted.

Fixes: #66306

Signed-off-by: lazerg <lazerg2@gmail.com>
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/http2
  • @nodejs/net

@nodejs-github-bot nodejs-github-bot added http2 Issues and PRs related to the http2 subsystem. needs-ci PRs that need a full CI run. labels Sep 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Caution

AgentScan found account activity patterns that may be consistent with automation. This is a heuristic, not proof that this pull request was opened by an agent or violates policy. AI-assisted contributions are permitted, but automated tooling must not open pull requests without advance approval, and contributors must personally understand, test, verify, and take responsibility for every submitted change. See the AgentScan analysis, AI use policy, and automation policy for additional context.

@codecov

codecov Bot commented Sep 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.37%. Comparing base (f2b698f) to head (4ca88eb).
⚠️ Report is 11 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #66314      +/-   ##
==========================================
+ Coverage   90.36%   90.37%   +0.01%     
==========================================
  Files         790      790              
  Lines      274273   274498     +225     
  Branches    52513    52569      +56     
==========================================
+ Hits       247842   248085     +243     
+ Misses      16897    16880      -17     
+ Partials     9534     9533       -1     
Files with missing lines Coverage Δ
lib/internal/http2/core.js 94.95% <100.00%> (+<0.01%) ⬆️

... and 28 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

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

Labels

agentscan:community-flagged http2 Issues and PRs related to the http2 subsystem. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

http2: Http2Stream#close() sends no RST_STREAM when an 'aborted' listener destroys the stream

3 participants