Skip to content

stream: cleanup use of _readableState.ended

Replaces references to Readable stream's internal state _readableState.ended with readableEnded.

One thing to highlight that readable stream internally (L#216) sets the readableEnded property using _readableState.endEmitted and not _readableState.ended. The files changed in this PR used _readableState.ended state.

Although all existing tests pass and it seems correct to rely on the _readableState.endEmitted to know when the stream ended, please suggest if this could be a potential issue.

cc: @addaleax @mcollina

Refs: #445

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Merge request reports

Loading