From 95792a79892471e2c691c071e85d7fea29aa40cd Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Fri, 27 Sep 2019 20:32:40 -0400 Subject: Revert "stream: invoke callback before emitting error always" This reverts commit 3de5eae6dbe503485b95bdeb8bddbd67e4613d59. PR-URL: https://github.com/nodejs/node/pull/29741 Reviewed-By: Rich Trott Reviewed-By: Jiawen Geng Reviewed-By: Colin Ihrig --- doc/api/stream.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/api/stream.md b/doc/api/stream.md index 48b478a58e..d4dbe54dbc 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -571,8 +571,7 @@ The `writable.write()` method writes some data to the stream, and calls the supplied `callback` once the data has been fully handled. If an error occurs, the `callback` *may or may not* be called with the error as its first argument. To reliably detect write errors, add a listener for the -`'error'` event. If `callback` is called with an error, it will be called -before the `'error'` event is emitted. +`'error'` event. The return value is `true` if the internal buffer is less than the `highWaterMark` configured when the stream was created after admitting `chunk`. -- cgit v1.2.3