Skip to content

Commit 2d35f16

Browse files
committed
fixup
1 parent e5c3873 commit 2d35f16

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

lib/internal/streams/pipeline.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -330,16 +330,20 @@ function pipe(src, dst) {
330330

331331
src
332332
.on('end', end)
333-
.on('readable', pump);
333+
.on('readable', pump)
334+
.on('error', cleanup);
334335
dst
335-
.on('drain', pump);
336+
.on('drain', pump)
337+
.on('error', cleanup);
336338

337339
function cleanup() {
338340
src
339341
.off('end', end)
340-
.off('readable', pump);
342+
.off('readable', pump)
343+
.off('error', cleanup);
341344
dst
342-
.off('drain', pump);
345+
.off('drain', pump)
346+
.off('error', cleanup);
343347
}
344348

345349
function end() {

0 commit comments

Comments
 (0)