-
Notifications
You must be signed in to change notification settings - Fork 29.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[v12.x backport] stream: destroy wrapped streams on error #35557
Conversation
Review requested:
|
cc: @ronag |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
The test fails, I guess this depends on something else. |
Adapted to v12.x |
The problem was that the same |
You could change the test to allow it being emitted twice. |
I found a better fix. |
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: nodejs#34102 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
55949b6
to
4afe946
Compare
Prevent multiple listeners for the `'error'` event to be added to the same `EventEmitter` instance. PR-URL: nodejs#35560 Refs: nodejs#35557 (comment) Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Robert Nagy <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Prevent multiple listeners for the `'error'` event to be added to the same `EventEmitter` instance. PR-URL: #35560 Refs: #35557 (comment) Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Robert Nagy <[email protected]> Reviewed-By: Rich Trott <[email protected]>
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. Backport-PR-URL: #35557 PR-URL: #34102 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
landed in e40b78c |
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. Backport-PR-URL: #35557 PR-URL: #34102 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
Prevent multiple listeners for the `'error'` event to be added to the same `EventEmitter` instance. PR-URL: nodejs#35560 Refs: nodejs#35557 (comment) Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Robert Nagy <[email protected]> Reviewed-By: Rich Trott <[email protected]>
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: #34102
Reviewed-By: Matteo Collina [email protected]
Reviewed-By: Luigi Pinca [email protected]
Reviewed-By: Anna Henningsen [email protected]
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes