Skip to content

Commit 13e0aa8

Browse files
author
Tom Macie
committed
if a stream receives the unpipe event, end it
1 parent bcc0d86 commit 13e0aa8

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ function promiseFromStreams(streams) {
2929

3030
streams.forEach((stream, i) => {
3131

32+
stream.on('unpipe', () => stream.end())
3233
stream.on('error', error => {
3334

3435
stream.end()

0 commit comments

Comments
 (0)