stream: 'error' should be emitted asynchronously
errorOrDestroy
emits 'error'
synchronously due to compat reasons. However, it should be possible to use correct async behaviour for new code.
Fixes: https://github.com/nodejs/node/pull/29741
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines