Skip to content
Browse files

doc: clarify pipeline stream cleanup

PR-URL: #29738
Reviewed-By: Luigi Pinca <>
Reviewed-By: Rich Trott <>
  • Loading branch information...
ronag authored and Trott committed Sep 27, 2019
1 parent 663ef98 commit 1a3bf4f935f097cd2072fc383518fac873322a68
Showing with 4 additions and 0 deletions.
  1. +4 −0 doc/api/
@@ -1590,6 +1590,10 @@ async function run() {

`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.

0 comments on commit 1a3bf4f

Please sign in to comment.
You can’t perform that action at this time.