Files
node/lib
Mikko Rantanen 37a5e01bda lib: ensure readable stream flows to end
If a readable stream was set up with `highWaterMark 0`, the while-loop
in `maybeReadMore_` function would never execute.

The while loop now has an extra or-condition for the case where the
stream is flowing and there are no items. The or-condition is adapted
from the emit-condition of the `addChunk` function.

The `addChunk` also contains a check for `state.sync`. However that part
of the check was omitted here because the `maybeReadMore_` is executed
using `process.nextTick`. `state.sync` is set and then unset  within the
`read()` function so it should never be in effect in `maybeReadMore_`.

Fixes: https://github.com/nodejs/node/issues/24915

PR-URL: https://github.com/nodejs/node/pull/24918
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2018-12-14 09:23:56 -08:00
..
2018-12-10 17:07:18 +01:00
2018-12-10 17:07:18 +01:00
2018-12-10 17:07:18 +01:00
2018-11-06 10:58:42 -05:00
2018-12-10 17:07:18 +01:00
2018-12-10 17:07:18 +01:00
2018-12-10 17:07:18 +01:00
2018-12-05 15:57:26 -08:00
2018-12-10 17:07:18 +01:00
2018-11-20 10:42:31 -08:00
2018-12-05 16:55:00 +01:00
2018-12-10 17:07:18 +01:00
2018-07-16 15:55:15 -07:00
2018-12-10 17:07:18 +01:00
2018-12-14 18:13:40 +01:00