Skip to content
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

Better error handling in pipes #93

Closed
ehmicky opened this issue Oct 29, 2024 · 2 comments
Closed

Better error handling in pipes #93

ehmicky opened this issue Oct 29, 2024 · 2 comments

Comments

@ehmicky
Copy link

ehmicky commented Oct 29, 2024

When piping streams, streamx adds an error listener. This error listener is not cleaned up when the pipe ends (including due to an error).

pipeTo.on('error', onerror)

This is unlike Node.js streams, which do clean up any listener added by .pipe():

https://github.com/nodejs/readable-stream/blob/c85db76d4c41f64fd082c9263c3a918bec6f38a0/lib/_stream_readable.js#L639

This bug ends up creating some bigger problem with Gulp, explained here: gulpjs/gulp#2812

@mafintosh
Copy link
Owner

Feel free to open a pr that removes it after the stream has been fully torn down

@ehmicky
Copy link
Author

ehmicky commented Oct 29, 2024

Hi @mafintosh,

It turns out the problem was slightly different. I opened #94 with the actual issue.

@ehmicky ehmicky closed this as completed Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants