Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pipeline is great for when multiple streams need to be used together but can also end up causing problems when there's a readstream of a large file being sent in chunks, because the streams get destroyed early. Technically, everything works fine, but there's warnings in the terminal that could be misleading, so calling the streams with error handlers directly is a safer way to go about it.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
When streaming back a large partial file, the terminal would print a warning along the lines of:
Issue Number: N/A
Discord Post link: https://discord.com/channels/520622812742811698/1359521098080980992
What is the new behavior?
Because
pipeline
will calldestroy
on pipes as they're called, this error arose. With calling the.pipe()
ourselves and having proper error handling in place, this shouldn't be the case anymore.Does this PR introduce a breaking change?
If it is breaking, then we'll need to verify that our tests are comprehensive here. Localized testing showed this working without issue.
Other information