Skip to content

Commit 4eceeba

Browse files
committed
fixup: ERR_STREAM_PREMATURE_CLOSE
1 parent a09c43c commit 4eceeba

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

doc/api/stream.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1590,11 +1590,9 @@ async function run() {
15901590
run().catch(console.error);
15911591
```
15921592

1593-
On completion or error `stream.pipeline()` will call `stream.destroy(err)` on
1594-
all provided stream except for `Readable` streams which have emitted `'end'`
1595-
or `'close'` and `Writable` streams which have emitted `'finish'` or `'close'`.
1596-
Unless `autoDestroy` is enabled these streams will not be automatically cleaned
1597-
up.
1593+
`stream.pipeline()` will call `stream.destroy(err)` on all streams except:
1594+
- `Readable` streams which have emitted `'end'` or `'close'`.
1595+
- `Writable` streams which have emitted `'finish'` or `'close'`.
15981596

15991597
`stream.pipeline()` leaves dangling event listeners on the streams
16001598
after the `callback` has been invoked. In the case of reuse of streams after

test.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)