Skip to content

stream: flow for 'data' listeners upon removal of last 'readable' listener

When there is at least one 'data' listener try to flow when last 'readable' listener gets removed and the stream is not piped.

Currently if we have both 'readable' and 'data' listeners set only 'readable' listener will get called and stream will be stalled without 'data' and 'end' events if 'readable' listener neither read()'s nor resume()'s the stream.

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

Checklist
  • make -j4 test (UNIX) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Merge request reports

Loading