summaryrefslogtreecommitdiff
path: root/doc/api/stream.md
diff options
context:
space:
mode:
authorRobert Nagy <ronagy@icloud.com>2019-08-05 16:07:49 +0200
committerMatteo Collina <hello@matteocollina.com>2019-09-20 11:22:31 +0200
commitba3be578d8bbca1bafc391984b0e6f037507dcbc (patch)
treefa500fb8d363ad57eae865b9a84127931632f3d8 /doc/api/stream.md
parentdc7c7b83bedb1723344f3bf2e31bb666675e5fec (diff)
downloadandroid-node-v8-ba3be578d8bbca1bafc391984b0e6f037507dcbc.tar.gz
android-node-v8-ba3be578d8bbca1bafc391984b0e6f037507dcbc.tar.bz2
android-node-v8-ba3be578d8bbca1bafc391984b0e6f037507dcbc.zip
stream: don't emit finish on error
After 'error' only 'close' should be emitted. PR-URL: https://github.com/nodejs/node/pull/28979 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc/api/stream.md')
-rw-r--r--doc/api/stream.md3
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/api/stream.md b/doc/api/stream.md
index 2656fe1af6..1f0f08a7b8 100644
--- a/doc/api/stream.md
+++ b/doc/api/stream.md
@@ -2425,7 +2425,8 @@ and `stream.Readable` classes, respectively. The `'finish'` event is emitted
after [`stream.end()`][stream-end] is called and all chunks have been processed
by [`stream._transform()`][stream-_transform]. The `'end'` event is emitted
after all data has been output, which occurs after the callback in
-[`transform._flush()`][stream-_flush] has been called.
+[`transform._flush()`][stream-_flush] has been called. In the case of an error,
+neither `'finish'` nor `'end'` should be emitted.
#### transform.\_flush(callback)