Skip to content

Conversation

fedeAlterio
Copy link

@fedeAlterio fedeAlterio commented Aug 24, 2025

IAsyncObserver<T> OnNextAsync, OnCompletedAsync and OnErrorAsync can all throw exceptions synchronously,
This is not handled correctly in AsyncObseravableBase, and the execution flow will follow a different path of the asynchronous one.

A concrete issue caused by this, is that if a synchoronous exception is thrown inside OnCompleteAsync, AutoDetachAsyncObserver will not Dispose the subscription automatically

@fedeAlterio fedeAlterio force-pushed the fix/synchronous-exceptions-asyncobservable branch from 83a0b5c to b0a3736 Compare August 24, 2025 12:28
@fedeAlterio fedeAlterio force-pushed the fix/synchronous-exceptions-asyncobservable branch from b0a3736 to f25ab7d Compare August 24, 2025 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant