Skip to content

Commit

Permalink
fix: finalization/teardown fixes for AsyncGenerators and take (#6062)
Browse files Browse the repository at this point in the history
* fix: finalization/teardown fixes for AsyncGenerators and take

- Resolves an issue where AsyncGenerators were not properly finalized when an observable result was unsubscribed.
- Resolves another nearly impossible to test scenario that this happens to cover: In the event of an operator like `take()` completing the resulting observable, if an error is thrown in the terminal completion handler, teardown is not invoked, as it would not continue to the next line to call the unsubscribe method of the Subscriber instance. This was resolved by ensuring synchronous calls before the unsubscribe call are called in a try/finally block.

Fixes #5998

* chore: remove unnecessary try/finally
  • Loading branch information
benlesh authored Feb 27, 2021
1 parent 6b90086 commit a2b9563
Show file tree
Hide file tree
Showing 5 changed files with 11,005 additions and 41 deletions.
Loading

0 comments on commit a2b9563

Please sign in to comment.