Skip to content

https: remove proxy tunnel timeout listener after setup - #67976

Open
Ethan-Arrowood wants to merge 1 commit into
nodejs:mainfrom
Ethan-Arrowood:https-proxy-timeout-retention
Open

Ethan-Arrowood wants to merge 1 commit into
nodejs:mainfrom
Ethan-Arrowood:https-proxy-timeout-retention

Conversation

@Ethan-Arrowood

Copy link
Copy Markdown
Contributor

The setTimeout(0) call without a callback in establishTunnel()'s cleanup() clears the timer but leaves the once('timeout') listener. A request with timeout set stays reachable for the life of a pooled proxy socket because onProxyTimeout shares establishTunnel()'s context, which holds onto afterSocket and the request.

Refs: #67328

AI-assisted (Claude Opus 5.5, my setup). The words are my own, per the Human Voice policy.

The `setTimeout(0)` call without a callback in `establishTunnel()`'s
`cleanup()` clears the timer but leaves the `once('timeout')` listener.
A request with `timeout` set stays reachable for the life of a pooled
proxy socket because `onProxyTimeout` shares `establishTunnel()`'s
context, which holds onto `afterSocket` and the request.

Signed-off-by: Ethan Arrowood <ethan@arrowood.dev>
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/crypto
  • @nodejs/http
  • @nodejs/net

@nodejs-github-bot nodejs-github-bot added https Issues and PRs related to the https subsystem. needs-ci PRs that need a full CI run. labels Dec 2, 2026
@codecov

codecov Bot commented Dec 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.57%. Comparing base (edea6da) to head (7a5d857).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #67976   +/-   ##
=======================================
  Coverage   90.57%   90.57%           
=======================================
  Files         802      802           
  Lines      286929   286932    +3     
  Branches    55407    55401    -6     
=======================================
+ Hits       259880   259900   +20     
- Misses      17148    17149    +1     
+ Partials     9901     9883   -18     
Files with missing lines Coverage Δ
lib/https.js 97.31% <100.00%> (+<0.01%) ⬆️

... and 31 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.

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

Labels

https Issues and PRs related to the https subsystem. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants