Skip to content

test,stream: add test to writable stream not closed when readable stream emits error

Rodrigo Muino Tomonari requested to merge github/fork/jakecastelli/fix-46908 into main

The doc mentioned:

One important caveat is that if the Readable stream emits an error during processing, the Writable destination is not closed automatically. If an error occurs, it will be necessary to manually close each stream in order to prevent memory leaks.

Adding a test to verify / document this behaviour.

Refs: https://github.com/nodejs/node/issues/46908

Merge request reports

Loading