Skip to content

fix: retry requests when idle pooled socket closes#5403

Closed
mcollina wants to merge 1 commit into
mainfrom
fix-issue-3492-pool-retry
Closed

fix: retry requests when idle pooled socket closes#5403
mcollina wants to merge 1 commit into
mainfrom
fix-issue-3492-pool-retry

Conversation

@mcollina

@mcollina mcollina commented Jun 9, 2026

Copy link
Copy Markdown
Member

Summary

  • retry idempotent HTTP/1.1 requests when an idle pooled socket closes before reuse
  • retry idempotent HTTP/2 requests on abrupt idle socket close while preserving GOAWAY handling
  • add separate regression coverage for the HTTP/1.1 and HTTP/2 races

Fixes: #3492

Testing

  • ./node_modules/.bin/borp --timeout 180000 --expose-gc -p "test/issue-3492.js"
  • ./node_modules/.bin/borp --timeout 300000 --expose-gc -p "test/http2-goaway.js"
  • ./node_modules/.bin/borp --timeout 180000 --expose-gc -p "test/http2-connection.js"
  • npm run lint -- lib/dispatcher/client-h1.js lib/dispatcher/client-h2.js test/issue-3492.js

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

mcollina commented Jun 9, 2026

Copy link
Copy Markdown
Member Author

I’m not convinced we should
do this.

@ronag ronag 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.

Wouldn't this be cleaner in the retry interceptor? Seems over complex here.

@mcollina mcollina closed this Jun 10, 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.

fetch may try to use a closed connection

2 participants