Uh oh!
There was an error while loading. Please reload this page.
http: fix http client leaky with double response - #60062
Conversation
nodejs-github-bot
commented
Sep 28, 2025
Review requested:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@## main #60062 +/- ##
==========================================
+ Coverage 88.53% 88.56% +0.02%
==========================================
Files 704 704 Lines 208087 208097 +10 Branches 40010 40009 -1 ==========================================
+ Hits 184239 184297 +58 + Misses 15866 15816 -50 - Partials 7982 7984 +2
🚀 New features to boost your workflow:
|
pimterry
left a comment
There was a problem hiding this comment.
One minor point, otherwise LGTM.
or emit a response event then emit an error event on request object ?
Emitting an error here would be a breaking change that will probably break things for some people in real cases. Without that, I don't think this is semver-major, since other than the leak the 2nd response doesn't seem to have been observable until now.
I think emitting an error would probably still be best, because it is an error case where something's clearly gone wrong, and this matches our docs, which say
If any error is encountered during the request (be that with DNS resolution, TCP level errors, or actual HTTP parse errors) an 'error' event is emitted on the returned request object
but that said, it might be better to separate the two issues.
How about we aim to ship this to resolve the leak, and then ship a separate semver-major PR making this into an emitted request error in future?
Uh oh!
There was an error while loading. Please reload this page.
552bafc to
6d9bd7dComparenodejs-github-bot
commented
Oct 9, 2025
nodejs-github-bot
commented
Oct 10, 2025
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
05e92b6 to
88c0254Comparenodejs-github-bot
commented
Oct 11, 2025
nodejs-github-bot
commented
Oct 12, 2025
nodejs-github-bot
commented
Oct 13, 2025
Uh oh!
There was an error while loading. Please reload this page.
nodejs-github-bot
commented
Oct 13, 2025
Landed in 59b70e5 |
Fixed: #60025
When a request corresponds to multiple responses, ensure that only the first one is processed and skip all subsequent invalid responses (or emit a
responseevent then emit anerrorevent on request object ?).make -j4 test(UNIX), orvcbuild test(Windows) passes