Skip to content

[x] stream: don't call _read after destroy()

Stop flowing once destroyed.

Currently stream implementation MUST check for destroyed inside _read.

Found this while investigating a suspicious destroyed conditional in fs streams.

This is semver major unfortunately. The existing behaviour is to flush the readable and invoke end after destroy(). See updated tests.

If preferable I can make a less breaking version of this (instead of or as an intermediate?) that just makes sure _read is not called after destroy(). Though it does not fully "correct" the behaviour.

Refs: #29477 (closed)

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