-
Notifications
You must be signed in to change notification settings - Fork 29.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[v13.x backport] stream: don't destroy final readable stream in pipeline #32111
Conversation
Note that the base PR (#32110) has NOT landed yet. I'm just preparing this in order to fast track. I'm not sure what the procedure here is and whether this can land first. |
2ece1ad
to
0acdc6b
Compare
This comment has been minimized.
This comment has been minimized.
0acdc6b
to
276bb79
Compare
This comment has been minimized.
This comment has been minimized.
276bb79
to
db54b58
Compare
db54b58
to
e91dc3b
Compare
If the last stream in a pipeline is still usable/readable don't destroy it to allow further composition. Fixes: nodejs#32105 Backport-PR-URL: nodejs#32111
e91dc3b
to
07228c6
Compare
This comment has been minimized.
This comment has been minimized.
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
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
There may be an edge case where the source is an IncomingMessage, and in that case the connection will be destroyed after the response has gracefully ended. This will cause to create new connection every time you make a new request. But that should be fixed in https://github.com/nodejs/node/blob/master/lib/_http_incoming.js#L121-L124 As it should destroy the socket only if the This PR is good to merge IMO. |
FYA: @MylesBorins @codebytere |
@nodejs/streams PTAL, this PR (and #32110) needs another approval and should preferably land as soon as possible as it is affecting the ecosystem. |
If the last stream in a pipeline is still usable/readable
don't destroy it to allow further composition.
Fixes: #32105
Refs: #32110
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes