Skip to content

Commit b208392

Browse files
committed
stream: fix premature pipeline end
Fixes: #48406
1 parent 8244e6c commit b208392

File tree

2 files changed

+1632
-1604
lines changed

2 files changed

+1632
-1604
lines changed

lib/internal/streams/pipeline.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const {
3838
isTransformStream,
3939
isWebStream,
4040
isReadableStream,
41-
isReadableEnded,
41+
isReadableFinished,
4242
} = require('internal/streams/utils');
4343
const { AbortController } = require('internal/abort_controller');
4444

@@ -424,7 +424,7 @@ function pipe(src, dst, finish, { end }) {
424424
dst.end();
425425
}
426426

427-
if (isReadableEnded(src)) { // End the destination if the source has already ended.
427+
if (isReadableFinished(src)) { // End the destination if the source has already ended.
428428
process.nextTick(endFn);
429429
} else {
430430
src.once('end', endFn);

0 commit comments

Comments
 (0)