Skip to content
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

Moved try to catch all RemoteExceptions inside connection coroutine #225

Merged
merged 2 commits into from Feb 1, 2021

Conversation

vfurman-gh
Copy link
Contributor

When an uncaught RemoteException is thrown inside mainScope.handledLaunch, it is silently ignored, but leaves the mainScope in "cancelled" state and all subsequent coroutine calls using mainScope never actually execute the body of coroutine.
Proposed minimal fix is to enclose all remote invocations inside this particular coroutine with try/catch block. But perhaps we should think of a better way to handle exceptions, as handledLaunch is used in many other places.

@geeksville
Copy link
Member

This pull request has been mentioned on Meshtastic. There might be relevant details there:

https://meshtastic.discourse.group/t/new-android-alpha-release-1-1-37/2326/11

@geeksville
Copy link
Member

a great find - thanks @vfurman-gh. And yeah - I'm still pretty new on kotlin coroutines, so if you have ideas for fixes on the root problem they are wecome!

@geeksville geeksville merged commit 57b0451 into meshtastic:master Feb 1, 2021
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.

None yet

2 participants