From e505a741e30d7101a0c4b9159d9e48589a76e16c Mon Sep 17 00:00:00 2001 From: Robert Nagy Date: Sun, 11 Aug 2019 11:23:46 +0200 Subject: [PATCH] doc: note that stream error can close stream PR-URL: https://github.com/nodejs/node/pull/29082 Reviewed-By: Luigi Pinca Reviewed-By: Rich Trott --- doc/api/stream.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/api/stream.md b/doc/api/stream.md index d52b635efad739..cb6d23e52583ec 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -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'