Skip to content

Commit 575dcdc

Browse files
Trottaddaleax
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 50913b1 commit 575dcdc

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
@@ -1744,8 +1744,8 @@ constructor and implement *both* the `readable._read()` and
17441744
* `options` {Object} Passed to both Writable and Readable
17451745
constructors. Also has the following fields:
17461746
* `allowHalfOpen` {boolean} Defaults to `true`. If set to `false`, then
1747-
the stream will automatically end the readable side when the
1748-
writable side ends and vice versa.
1747+
the stream will automatically end the writable side when the
1748+
readable side ends.
17491749
* `readableObjectMode` {boolean} Defaults to `false`. Sets `objectMode`
17501750
for readable side of the stream. Has no effect if `objectMode`
17511751
is `true`.

0 commit comments

Comments
 (0)