Skip to content

Commit 9ead4ec

Browse files
ronagtargos
authored andcommitted
doc: note that stream error can close stream
PR-URL: #29082 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent 6b9e372 commit 9ead4ec

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

doc/api/stream.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,9 @@ added: v0.9.4
277277
The `'error'` event is emitted if an error occurred while writing or piping
278278
data. The listener callback is passed a single `Error` argument when called.
279279

280-
The stream is not closed when the `'error'` event is emitted.
280+
The stream is not closed when the `'error'` event is emitted unless the
281+
[`autoDestroy`][writable-new] option was set to `true` when creating the
282+
stream.
281283

282284
##### Event: 'finish'
283285
<!-- YAML
@@ -2734,4 +2736,5 @@ contain multi-byte characters.
27342736
[stream-write]: #stream_writable_write_chunk_encoding_callback
27352737
[writable-_destroy]: #stream_writable_destroy_err_callback
27362738
[writable-destroy]: #stream_writable_destroy_error
2739+
[writable-new]: #stream_constructor_new_stream_writable_options
27372740
[zlib]: zlib.html

0 commit comments

Comments
 (0)