Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.2k
http: align OutgoingMessage and ClientRequest destroy#32148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Conversation
ronag commented Mar 8, 2020 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Added .destroyed property to OutgoingMessage and ClientRequest to align with streams. Fixed ClientRequest.destroy to dump res and re-use socket in agent pool aligning it with abort.
lib/_http_client.js Outdated
| } | ||
| if(!this.aborted&&!err){ | ||
| err=connResetException('socket hang up'); |
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.
Note, destroy() will emit ECONNRESET while abort won't.
nodejs-github-bot commented Mar 8, 2020
This comment has been minimized.
This comment has been minimized.
ronag commented Mar 8, 2020
After this we might want to consider deprecating abort. |
b795096 to 36a003aCompareszmarczak commented Mar 8, 2020
There are some changes needed to be made, but I'm not at home atm, will comment in an hour. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
ronag commented Mar 8, 2020
Removed the risky change with |
ronag commented Mar 8, 2020
@nodejs/web-server-frameworks |
844adca to 97bfd14CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This comment has been minimized.
This comment has been minimized.
This reverts commit 6f11b24.
nodejs-github-bot commented Mar 8, 2020
szmarczak left a comment
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.
Looks good! Awesome :D
szmarczak commented Mar 8, 2020 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
I think it's a good idea to replace Lines 118 to 124 in 7bb4f95
with IncomingMessage.prototype.destroy=functiondestroy(error){if(this.req)this.req.destroy(error);}; |
ronag commented Mar 8, 2020
@szmarczak See #32153 for that. |
codecov-io commented Mar 9, 2020
Codecov Report
@@ Coverage Diff @@## master #32148 +/- ## ========================================= Coverage ? 97.04% ========================================= Files ? 197 Lines ? 65027 Branches ? 0 ========================================= Hits ? 63108 Misses ? 1919 Partials ? 0
Continue to review full report at Codecov.
|
ronag commented Mar 9, 2020 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
ronag commented Mar 10, 2020
@nodejs/http |
ronag commented Mar 10, 2020
@nodejs/tsc |
Uh oh!
There was an error while loading. Please reload this page.
mcollina left a comment
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
Added .destroyed property to OutgoingMessage and ClientRequest to align with streams. Fixed ClientRequest.destroy to dump res and re-use socket in agent pool aligning it with abort. PR-URL: #32148 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
ronag commented Mar 10, 2020
Landed in 173d044 |
szmarczak commented Mar 10, 2020
Will this be backported to v13.x? |
ronag commented Mar 10, 2020
@szmarczak Not as it is right now, it's been labeled semver-major. |
Added .destroyed property to OutgoingMessage and ClientRequest
to align with streams.
Fixed ClientRequest.destroy to dump res and re-use socket in agent
pool aligning it with abort.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes