Commit Graph

4 Commits

Author SHA1 Message Date
Matteo Collina
f8b9831338 stream: do not use _stream_* anymore
Remove all leftover usage of _stream_* and keep all of them as legacy.
We do not deprecate the old modules to avoid disrupition and ease
maintainance.

PR-URL: https://github.com/nodejs/node/pull/36684
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-01-05 19:02:04 +01:00
Luigi Pinca
c739f371c3 test: do not use the same EventEmitter instance
Prevent multiple listeners for the `'error'` event to be added to the
same `EventEmitter` instance.

PR-URL: https://github.com/nodejs/node/pull/35560
Refs: https://github.com/nodejs/node/pull/35557#issuecomment-705476640
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-10-12 19:07:15 +02:00
Robert Nagy
6213fcee9b stream: save error in state
Useful for future PR's to resolve situations where e.g. finished()
is invoked on an already errored streams.

PR-URL: https://github.com/nodejs/node/pull/34103
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-07-01 18:22:56 +02:00
Robert Nagy
8f4b4f272e stream: destroy wrapped streams on error
Stream should be destroyed and update state accordingly when
the wrapped stream emits error.

Does some additional cleanup with future TODOs that might be worth
looking into.

PR-URL: https://github.com/nodejs/node/pull/34102
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-06-30 22:35:36 +02:00