Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc: correct stream Duplex allowHalfOpen doc
Browse files Browse the repository at this point in the history
If allowHalfOpen is set to false, the stream will automatically end the
writable side when the readable side ends, but not the other way around.

PR-URL: #14127
Fixes: #4044
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Trott authored and addaleax committed Jul 11, 2017
1 parent 5430924 commit a75761d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/api/stream.md
Original file line number Diff line number Diff line change
@@ -1744,8 +1744,8 @@ constructor and implement *both* the `readable._read()` and
* `options` {Object} Passed to both Writable and Readable
constructors. Also has the following fields:
* `allowHalfOpen` {boolean} Defaults to `true`. If set to `false`, then
the stream will automatically end the readable side when the
writable side ends and vice versa.
the stream will automatically end the writable side when the
readable side ends.
* `readableObjectMode` {boolean} Defaults to `false`. Sets `objectMode`
for readable side of the stream. Has no effect if `objectMode`
is `true`.

0 comments on commit a75761d

Please sign in to comment.