Skip to content

Commit

Permalink
doc: note that stream error can close stream
Browse files Browse the repository at this point in the history
PR-URL: #29082
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information
ronag authored and targos committed Aug 19, 2019
1 parent 6b9e372 commit 9ead4ec
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,9 @@ added: v0.9.4
The `'error'` event is emitted if an error occurred while writing or piping
data. The listener callback is passed a single `Error` argument when called.

The stream is not closed when the `'error'` event is emitted.
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.

##### Event: 'finish'
<!-- YAML
Expand Down Expand Up @@ -2734,4 +2736,5 @@ contain multi-byte characters.
[stream-write]: #stream_writable_write_chunk_encoding_callback
[writable-_destroy]: #stream_writable_destroy_err_callback
[writable-destroy]: #stream_writable_destroy_error
[writable-new]: #stream_constructor_new_stream_writable_options
[zlib]: zlib.html

0 comments on commit 9ead4ec

Please sign in to comment.