From a53f881f5707acbcfd51cc96642881526b4a4ee1 Mon Sep 17 00:00:00 2001 From: Nathan Phillip Brink Date: Tue, 3 Jan 2017 01:44:49 +0000 Subject: [PATCH] doc: update writable.write return value Fix the explanation which stated that write() would return false if highWaterMark is exceeded to correctly state that false is returned once highWaterMark is reached. See #9247. PR-URL: https://github.com/nodejs/node/pull/10582 Reviewed-By: James M Snell Reviewed-By: Matteo Collina --- doc/api/stream.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/stream.md b/doc/api/stream.md index 6732435cb60e93..1095d8e6ecb5f8 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -440,7 +440,7 @@ 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. -The return value is `true` if the internal buffer does not exceed +The return value is `true` if the internal buffer is less than the `highWaterMark` configured when the stream was created after admitting `chunk`. If `false` is returned, further attempts to write data to the stream should stop until the [`'drain'`][] event is emitted.