Browse Source

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: https://github.com/nodejs/node/pull/14127
Fixes: https://github.com/nodejs/node/issues/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>
v6.x
Rich Trott 8 years ago
committed by Myles Borins
parent
commit
49d3dee0c2
No known key found for this signature in database GPG Key ID: 933B01F40B5CA946
  1. 4
      doc/api/stream.md

4
doc/api/stream.md

@ -1632,8 +1632,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`.

Loading…
Cancel
Save