Browse Source

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 <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
v6.x
Nathan Phillip Brink 8 years ago
committed by Myles Borins
parent
commit
6d726c07aa
No known key found for this signature in database GPG Key ID: 933B01F40B5CA946
  1. 2
      doc/api/stream.md

2
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 first argument. To reliably detect write errors, add a listener for the
`'error'` event. `'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`. `highWaterMark` configured when the stream was created after admitting `chunk`.
If `false` is returned, further attempts to write data to the stream should If `false` is returned, further attempts to write data to the stream should
stop until the [`'drain'`][] event is emitted. stop until the [`'drain'`][] event is emitted.

Loading…
Cancel
Save