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
Throw if request canceled and received incomplete response #767
Conversation
source/as-stream.ts
Outdated
proxy._destroy = (error, callback) => { | ||
// Stop transmitting data, | ||
// so the stream won't have an `end` event. | ||
output.destroy(); |
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.
The more elegant way would be to unpipe the response.
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.
We don't have to care about it. It will end if no error is provided, otherwise it will throw before ending.
Co-Authored-By: szmarczak <36894700+szmarczak@users.noreply.github.com>
Thanks for the review @tobenna It's very nice that you've had some time to take a look at this :) |
Fixes #748