Skip to content

Commit

Permalink
doc: update writable.write return value
Browse files Browse the repository at this point in the history
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 nodejs#9247.

PR-URL: nodejs#10582
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
  • Loading branch information
binki authored and italoacasas committed Jan 23, 2017
1 parent c5ee4ba commit 3d7d422
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 3d7d422

Please sign in to comment.