stream: ensure writable.destroy() emits error once
Prevent the `'error'` event from being emitted multiple times if `writable.destroy()` is called with an error before the `_destroy()` callback is called. Emit the first error, discard all others. PR-URL: https://github.com/nodejs/node/pull/26057 Backport-PR-URL: https://github.com/nodejs/node/pull/28000 Fixes: https://github.com/nodejs/node/issues/26015 Reviewed-By:Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By:
James M Snell <jasnell@gmail.com>
parent
cc9d0056
Please register or sign in to comment