GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(h2): keep the session ref'd while requests are queued by kjsik11 · Pull Request #5839 · nodejs/undici

Conversation

@kjsik11

@kjsik11 kjsik11 commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

This relates to...

Same fix as #5605, which landed on v7.x only.

Rationale

resumeH2() unrefs the session when the peer advertises SETTINGS_MAX_CONCURRENT_STREAMS = 0 even while requests are still queued.
The result is that no handles are left to keep the event loop alive, so the process exits with status 0 while the awaited request never settles.

Changes

  • lib/dispatcher/client-h2.js: remove the client[kMaxConcurrentStreams] === 0 from the condition, same as fix(h2): keep the connection ref'd while requests are outstanding #5605
  • test/http2-max-concurrent-streams-zero-unref.js + test/fixtures/h2-no-streams-client.js: child process queues a request behind maxConcurrentStreams: 0 and must stay alive until the headersTimeout error

Features

Bug Fixes

  • With a request queued behind SETTINGS_MAX_CONCURRENT_STREAMS = 0 the process now stays alive until the request settles

Breaking Changes and Deprecations

Tests (Node 24.20.0)

  • npm run lint
  • npm run test:h2:core (117/117)
  • npx borp -p "test/http2-max-concurrent-streams-zero-unref.js" (1/1, main 0/1)

Assisted-by: Claude Code

Status

  • I have read and agreed to the Developer's Certificate of Origin
  • Tested
  • [S] Benchmarked (optional)
  • [S] Documented
  • Review ready
  • In review
  • Merge ready

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@codecov-commenter

codecov-commenter commented Sep 18, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.52%. Comparing base (bfea020) to head (88941ad).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5839      +/-   ##
==========================================
- Coverage   93.53%   93.52%   -0.01%     
==========================================
  Files         110      110              
  Lines       39773    39773              
==========================================
- Hits        37200    37199       -1     
- Misses       2573     2574       +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.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Sep 18, 2026
test(fetch): make pull-dont-push exceed any socket buffer #5840
Merged
test(decompress): wait for highWaterMark via readable instead of setImmediate loop #5841
Merged
@kjsik11
kjsik11 force-pushed the fix/h2-keep-ref-while-queued branch 2 times, most recently from 3eb5a73 to 6659da7 Compare September 18, 2026 12:32
@kjsik11
fix(h2): keep the session ref'd while requests are queued
88941ad
@kjsik11
kjsik11 force-pushed the fix/h2-keep-ref-while-queued branch from 6659da7 to 88941ad Compare September 18, 2026 13:03
mcollina
mcollina approved these changes Sep 18, 2026
View reviewed changes

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

lgtm

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mcollina
mcollina merged commit 164a354 into nodejs:main Sep 18, 2026
37 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@kjsik11
kjsik11 deleted the fix/h2-keep-ref-while-queued branch September 21, 2026 06:36
@kjsik11 kjsik11 mentioned this pull request Sep 21, 2026
fix(h2): keep queued requests alive when the last stream closes #5847
Merged
3 of 5 tasks
This was referenced Sep 21, 2026
[Release] v8.11.0 #5848
Closed
[Release] v8.11.0 #5849
Merged
@kjsik11 kjsik11 mentioned this pull request Oct 5, 2026
fix(h2): unref a session detached by GOAWAY with no open streams #5960
Merged
3 of 5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@mcollina mcollina mcollina approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@kjsik11 @codecov-commenter @mcollina
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.