Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
ronag committed Nov 22, 2021
1 parent bbfe81a commit 77eeaa1
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/internal/streams/pipeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,16 +330,20 @@ function pipe(src, dst) {

src
.on('end', end)
.on('readable', pump);
.on('readable', pump)
.on('error', cleanup);
dst
.on('drain', pump);
.on('drain', pump)
.on('error', cleanup);

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

function end() {
Expand Down

0 comments on commit 77eeaa1

Please sign in to comment.