Skip to content

[x] stream: readable destroy stop stream

Readable stream should not continue to function after having been destroyed.

Currently there is no "proper" way to "kill" a Readable since it will still be partly functional after destroy() has been called.

The current workaround which I find unfortunate is to:

r.destroy()
r.removeAllListeners('data')
r.removeAllListeners('end')

As a user I would expect that after destroy I would not receive any more data flow events.

This is breaking and semver-major.

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

Merge request reports

Loading