stream: fix readable being emitted when nothing to do
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines
Affected core subsystem(s)
stream
This fixes an issue introduced by https://github.com/nodejs/node/pull/17979 where the readable event are sometimes emitted when the stream is neither readable nor has it ended.