-
-
Notifications
You must be signed in to change notification settings - Fork 776
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
Fix unfullfilled callbacks when gatt is null #1297
Conversation
Hi @matt-42 , are you sure that is the correct fix? Have you test it? |
Yes, I've tested it and my connection problems got solved, and I did not have null pointer exceptions. gatt is checked almost everywhere. I'll add more check just in case. |
I've changed a bit my PR so the callbacks get cleared as soon as we got the gatt is null error, also added error checking in onServicesDiscovered. |
Thanks @matt-42 , let me know when you think is ready to merge. |
ok :). I'll tell you when I'm done doing fixes. |
I'm done with my work. I did not have issues of hanging promises anymore and I did not break anything in my app. Feel free to merge it when you think it is the right time to do so :) |
Apply innoveit#1297 for v11
Backport innoveit#1297 for v11
After trying to fix similar issue in #1321 for v11, I came to realization that there is still at least one way for callbacks to say floating / unfulfilled: when a read call (or any other enqueued "command") is issued to a disconnected peripheral, EDIT: I guess that would be fixed by #1305 |
This fixes issue #1291 and a null exception.