Files
node/test/parallel
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-01-03 01:44:54 +01:00
2019-12-31 15:54:20 +01:00
2019-11-13 17:04:22 +00:00
2020-01-03 01:44:54 +01:00
2019-12-25 12:24:42 +01:00
2019-12-25 12:24:42 +01:00
2019-12-25 12:24:42 +01:00
2020-03-18 16:37:20 -07:00
2020-02-09 13:36:39 +01:00
2020-03-19 10:56:45 +01:00