Skip to content

Commit 37482b0

Browse files
committed
fixup
1 parent f407d7f commit 37482b0

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
@@ -333,8 +333,17 @@ function pipe(src, dst) {
333333
dst
334334
.on('drain', pump);
335335

336+
function cleanup () {
337+
src
338+
.off('end', end)
339+
.off('readable', pump);
340+
dst
341+
.off('drain', pump);
342+
}
343+
336344
function end() {
337345
dst.end();
346+
cleanup();
338347
}
339348

340349
const objectMode = (

0 commit comments

Comments
 (0)