Skip to content

fix(h2): handle GOAWAY for CONNECT streams - #5640

Merged
metcoder95 merged 1 commit into
v7.xfrom
fix/h2-connect-goaway-v7
Aug 6, 2026
Merged

metcoder95 merged 1 commit into
v7.xfrom
fix/h2-connect-goaway-v7

Conversation

@mcollina

@mcollina mcollina commented Aug 3, 2026

Copy link
Copy Markdown
Member

This relates to...

Backport of the fix for #5638 to v7.x.

Rationale

The v7.x HTTP/2 implementation predates the stream-severing machinery on main, but plain CONNECT streams have the analogous failure: unlike ordinary and WebSocket streams, they do not attach an error handler. GOAWAY teardown can therefore emit an unhandled stream error and terminate the process.

Changes

Features

N/A

Bug Fixes

  • Route CONNECT stream errors through the request's existing abort path.
  • Add a raw h2c regression test covering CONNECT followed by GOAWAY(lastStreamID=0).

Breaking Changes and Deprecations

N/A

Status

Validation

  • npx borp -p "test/issue-5638.js"
  • npx borp -p "test/http2-goaway.js" -p "test/http2-dispatcher.js"
  • npx eslint lib/dispatcher/client-h2.js test/issue-5638.js
  • git diff origin/v7.x...HEAD --check

Signed-off-by: Matteo Collina <hello@matteocollina.com>
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.15%. Comparing base (c26f943) to head (0fbbdfc).

Additional details and impacted files
@@           Coverage Diff           @@
##             v7.x    #5640   +/-   ##
=======================================
  Coverage   93.15%   93.15%           
=======================================
  Files         112      112           
  Lines       36810    36811    +1     
=======================================
+ Hits        34291    34293    +2     
+ Misses       2519     2518    -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 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.

@metcoder95
metcoder95 merged commit a03b46a into v7.x Aug 6, 2026
34 of 37 checks passed
@metcoder95
metcoder95 deleted the fix/h2-connect-goaway-v7 branch August 6, 2026 08:33
@github-actions github-actions Bot mentioned this pull request Sep 4, 2026
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.

3 participants