Skip to content

Commit 717390e

Browse files
committed
fixup
1 parent 2930afa commit 717390e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/internal/streams/pipeline.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,9 @@ function pipelineImpl(streams, callback, opts) {
231231
const writing = i > 0;
232232
const end = reading || opts?.end !== false;
233233

234-
if (isNodeStream(stream)) {
234+
if (isNodeStream(stream) && end) {
235235
finishCount++;
236-
destroys.push(destroyer(stream, reading, end && writing, (err) => {
236+
destroys.push(destroyer(stream, reading, writing, (err) => {
237237
if (!err && !reading && isReadableFinished(stream, false)) {
238238
stream.read(0);
239239
destroyer(stream, true, writing, finish);

0 commit comments

Comments
 (0)