stream: avoid destroying writable source by ronag · Pull Request #32198 · nodejs/node

@ronag added the stream

Issues and PRs related to the stream subsystem.

label

Mar 11, 2020

ronag referenced this pull request

Mar 11, 2020
If the last stream in a pipeline is still usable/readable
don't destroy it to allow further composition.

Fixes: #32105

PR-URL: #32110
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>

jasnell

@ronag ronag added the author ready

PRs that have at least one approval, no pending requests for changes, and a CI started.

label

Mar 11, 2020

mcollina

@ronag ronag mentioned this pull request

Mar 11, 2020

4 tasks

@ronag

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

MylesBorins pushed a commit that referenced this pull request

Mar 12, 2020
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>

MylesBorins pushed a commit that referenced this pull request

Mar 12, 2020
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>