-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
Question: when not to use pump
?
#52
Comments
which error handler is being triggered and what's the error? |
No error at all. The HTTP connection is just closed, but |
pump doesn't do anything magic, don't know enough about the modules used to know if they do. If you share a runnable end-to-end gist, I'm happy to try it. |
Do you have any playground to suggest with which I can make this example with Express work? The code I posted is a complete example, you could just copy-paste it in a |
A gist with a thing I can run with |
Here it is https://github.com/DenisFrezzato/question-pump EDIT: I also tried with pipeline and the result is the same (but I guess this is not surprising). |
pump
?pump
?
Consider this example.
As soon as stream data have been collected, the HTTP connection is closed just before
someAsyncStuff
is invoked. Refactoringpump(req, busboy...
toreq.pipe(busboy)
fixes the issue. It's also my understanding that usingpump
is a best practice for piping streams (for error handling and some clean-up), but in this case it introduces an issue. I would like to understand why this example is not working as I was expecting.The text was updated successfully, but these errors were encountered: