diff options
author | Robert Nagy <ronagy@icloud.com> | 2019-07-16 00:03:23 +0200 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-08-16 21:33:53 -0700 |
commit | 4a2bd69db99c1bb8692e1f653edcb225fbc23032 (patch) | |
tree | b90971ab2b513dcf3f69758113d72661ea017e16 /doc | |
parent | a890771cd0a31bda055fc71741ace7822bc678dd (diff) | |
download | android-node-v8-4a2bd69db99c1bb8692e1f653edcb225fbc23032.tar.gz android-node-v8-4a2bd69db99c1bb8692e1f653edcb225fbc23032.tar.bz2 android-node-v8-4a2bd69db99c1bb8692e1f653edcb225fbc23032.zip |
stream: fix destroy() behavior
Ensure errorEmitted is always set. Only emit 'error' once.
PR-URL: https://github.com/nodejs/node/pull/29058
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/stream.md | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/api/stream.md b/doc/api/stream.md index cb6d23e525..07755e05dc 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -281,6 +281,9 @@ The stream is not closed when the `'error'` event is emitted unless the [`autoDestroy`][writable-new] option was set to `true` when creating the stream. +After `'error'`, no further events other than `'close'` *should* be emitted +(including `'error'` events). + ##### Event: 'finish' <!-- YAML added: v0.9.4 |