Skip to content

fix: requeue h2 requests after goaway#5473

Merged
mcollina merged 1 commit into
mainfrom
fix/h2-goaway-requeue-5468
Jul 2, 2026
Merged

fix: requeue h2 requests after goaway#5473
mcollina merged 1 commit into
mainfrom
fix/h2-goaway-requeue-5468

Conversation

@mcollina

@mcollina mcollina commented Jul 1, 2026

Copy link
Copy Markdown
Member

Summary

  • detach all GOAWAY-affected HTTP/2 request streams before closing them so synchronous sibling frameError events cannot fail requests that should be requeued
  • ignore stale session/socket/connection-level errors from an old HTTP/2 session after GOAWAY requeue handling starts
  • add a regression test for a multiplexed request burst where the first stream receives GOAWAY

Fixes: #5468

Tests

  • npm run lint -- test/http2-goaway.js lib/dispatcher/client-h2.js
  • node --test test/http2-goaway.js
  • npm run test:h2:core

Detach all GOAWAY-affected HTTP/2 request streams before closing any of them so synchronous frameError fallout from the old session cannot abort requests that should be retried.

Ignore stale session, socket, and connection-level frame errors once a GOAWAY has started detaching and requeueing requests.

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

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.09677% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.45%. Comparing base (907bc33) to head (cf137e5).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
lib/dispatcher/client-h2.js 87.09% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5473      +/-   ##
==========================================
- Coverage   93.46%   93.45%   -0.01%     
==========================================
  Files         110      110              
  Lines       37115    37149      +34     
==========================================
+ Hits        34690    34719      +29     
- Misses       2425     2430       +5     

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

@mcollina mcollina requested review from metcoder95 and ronag July 1, 2026 19:47
@mcollina mcollina merged commit 61ddd8e into main Jul 2, 2026
38 checks passed
@mcollina mcollina deleted the fix/h2-goaway-requeue-5468 branch July 2, 2026 11:36
@github-actions github-actions Bot mentioned this pull request Jul 2, 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

3 participants