-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
stream: avoid destroying writable source #32198
Conversation
can we fast track this? I'd like to see it land in the upcoming 13.11.0 release @ronag looks like this needs a rebase |
0506fd0
to
7b3eccc
Compare
rebased @MylesBorins |
const src = new PassThrough(); | ||
assert.strictEqual(src.writable, true); | ||
const dst = new PassThrough(); | ||
pipeline(src, dst, common.mustCall((err) => { |
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.
A test that has a Duplex piping back in to itself would be good also
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.
I suppose this is a nit? Since we might want to fast-track this would you mind if I do so in a follow up PR later?
@ronag fwiw you can't approve fastrack on your own PR |
Np, I was +1 the rebase part of your comment. I'll remove my +1. |
+1 to fast tracking |
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 and +1 to fast track
@ronag FWIW this patch is not going to land cleanly on v13.x. You might want to get started on a backport now if you have time. very much trying to get this out in today's release. |
User might still want to be able to use the writable side of src. This is in the case where e.g. the Duplex input is not directly connected to its output. Such a case could happen when the Duplex is reading from a socket and then echos the data back on the same socket. Fixes: nodejs@4d93e10#commitcomment-37751035
Fixed conflicts |
7b3eccc
to
5daaddb
Compare
User might still want to be able to use the writable side of src. This is in the case where e.g. the Duplex input is not directly connected to its output. Such a case could happen when the Duplex is reading from a socket and then echos the data back on the same socket. PR-URL: #32198 Refs: 4d93e10#commitcomment-37751035 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
landed in 2bfb340 |
User might still want to be able to use the writable side of src. This is in the case where e.g. the Duplex input is not directly connected to its output. Such a case could happen when the Duplex is reading from a socket and then echos the data back on the same socket. Backport-PR-URL: #32212 PR-URL: #32198 Refs: 4d93e10#commitcomment-37751035 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
User might still want to be able to use the writable side
of src. This is in the case where e.g. the Duplex input
is not directly connected to its output. Such a case could
happen when the Duplex is reading from a socket and then echos
the data back on the same socket.
Fixes: 4d93e10#commitcomment-37751035
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes