-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ensure we emit
TransferAborted
event if anything goes wrong du…
…ring the transfer (#150) This refactor splits the `handle_stream` function up into smaller (logical) functions. If these functions error, we can emit a `TransferAborted` event before returning the error. This has the added benefit of making the `handle_stream` function a bit easier to take in. None of these new functions have any code changes, the only difference is how errors are handled and when we return.
- Loading branch information
Showing
3 changed files
with
185 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters