Skip to content

stream: pipeline don't destroy Duplex src before 'finish'

pipeline was too agressive with destroying Duplex streams which were the first argument into pipeline.

Just because it's !writable does not mean that it is safe to be destroyed, unless it has also emitted 'finish'.

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

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