Files
node/lib
Robert Nagy eeccd52b4e net: make readable/writable start as true
`net.Socket` is slightly breaking stream invariants by
having readable/writable going from `false` to `true`.
Streams assume that readable/writable starts out `true`
and then goes to `false` through `push(null)`/`end()`
after which it never goes back to `true`, e.g. once a
stream is `writable == false` it is assumed it will
never become `true`.

This PR changes 2 things:

Unless explicitly set to `false` through options:

- starts as `readable`/`writable` `true` by default.
- uses `push(null)`/`end()` to set `readable`/`writable`
  to `false`. Note that this would cause the socket to
  emit the `'end'`/`'finish'` events, which it did not
  do previously.

In the case it is explicitly set to `false` through
options` it is assumed to never become `true`.

PR-URL: https://github.com/nodejs/node/pull/32272
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-03-24 09:45:25 +01:00
..
2020-02-18 22:15:50 -08:00
2019-12-17 08:11:13 -05:00
2020-02-08 21:40:49 -05:00
2020-01-21 10:49:20 -04:00
2020-03-11 16:47:29 +01:00
…
2019-11-25 10:28:15 +01:00
2020-03-09 12:44:16 +01:00
2020-02-26 21:10:36 -08:00
…
2019-12-11 16:38:06 -06:00
2020-03-08 11:05:23 -04:00
2020-03-19 10:56:45 +01:00