Skip to content

Commit 49d3dee

Browse files
TrottMylesBorins
authored andcommitted
doc: correct stream Duplex allowHalfOpen doc
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 <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 9599faa commit 49d3dee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/api/stream.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1632,8 +1632,8 @@ constructor and implement *both* the `readable._read()` and
16321632
* `options` {Object} Passed to both Writable and Readable
16331633
constructors. Also has the following fields:
16341634
* `allowHalfOpen` {boolean} Defaults to `true`. If set to `false`, then
1635-
the stream will automatically end the readable side when the
1636-
writable side ends and vice versa.
1635+
the stream will automatically end the writable side when the
1636+
readable side ends.
16371637
* `readableObjectMode` {boolean} Defaults to `false`. Sets `objectMode`
16381638
for readable side of the stream. Has no effect if `objectMode`
16391639
is `true`.

0 commit comments

Comments
 (0)