Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
ronag committed Nov 10, 2021
1 parent f407d7f commit 16a2fb6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/internal/streams/pipeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,17 @@ function pipe(src, dst) {
dst
.on('drain', pump);

function cleanup() {
src
.off('end', end)
.off('readable', pump);
dst
.off('drain', pump);
}

function end() {
dst.end();
cleanup();
}

const objectMode = (
Expand Down

0 comments on commit 16a2fb6

Please sign in to comment.