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

Fixes crash due to Receiver not registered #430

Merged

Conversation

bleeding182
Copy link
Contributor

Would happen on a 6P when toggling bluetooth on and off. This will make sure that we do always register before we unregister.

…registered` when it is immediately unsubscribed before it even started listening
@CLAassistant
Copy link

CLAassistant commented May 18, 2018

CLA assistant check
All committers have signed the CLA.

@dariuszseweryn
Copy link
Owner

@bleeding182 I wonder if it could be possible to catch this use-case with a test... Have you checked perhaps?

@bleeding182
Copy link
Contributor Author

@DariuszAniszewski No, I did not look into writing any tests

The exception seems to be thrown when downstream is already disposed, hence it would immediately call unregister before we even registered.

By moving the unregister callback to the end this can't happen since we will always have registered by then

@dariuszseweryn dariuszseweryn requested a review from uKL May 22, 2018 15:23
@dariuszseweryn dariuszseweryn self-assigned this May 22, 2018
@dariuszseweryn dariuszseweryn merged commit d3197eb into dariuszseweryn:master May 25, 2018
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.

4 participants