diff options
Diffstat (limited to 'doc/api/stream.md')
-rw-r--r-- | doc/api/stream.md | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/api/stream.md b/doc/api/stream.md index d4dbe54dbc..3761df57e9 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -1590,6 +1590,10 @@ async function run() { run().catch(console.error); ``` +`stream.pipeline()` will call `stream.destroy(err)` on all streams except: +* `Readable` streams which have emitted `'end'` or `'close'`. +* `Writable` streams which have emitted `'finish'` or `'close'`. + `stream.pipeline()` leaves dangling event listeners on the streams after the `callback` has been invoked. In the case of reuse of streams after failure, this can cause event listener leaks and swallowed errors. |