Skip to content

Commit 6e2749f

Browse files
committed
fixup
1 parent 46ab26c commit 6e2749f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/internal/streams/pipeline.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,8 +341,17 @@ function pipe(src, dst) {
341341
dst
342342
.on('drain', pump);
343343

344+
function cleanup() {
345+
src
346+
.off('end', end)
347+
.off('readable', pump);
348+
dst
349+
.off('drain', pump);
350+
}
351+
344352
function end() {
345353
dst.end();
354+
cleanup();
346355
}
347356

348357
const objectMode = (

0 commit comments

Comments
 (0)