Skip to content

Commit 6d726c0

Browse files
binkiMylesBorins
authored andcommitted
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: #10582 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
1 parent 1975f82 commit 6d726c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/api/stream.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ occurs, the `callback` *may or may not* be called with the error as its
440440
first argument. To reliably detect write errors, add a listener for the
441441
`'error'` event.
442442

443-
The return value is `true` if the internal buffer does not exceed
443+
The return value is `true` if the internal buffer is less than the
444444
`highWaterMark` configured when the stream was created after admitting `chunk`.
445445
If `false` is returned, further attempts to write data to the stream should
446446
stop until the [`'drain'`][] event is emitted.

0 commit comments

Comments
 (0)