Fix unfullfilled callbacks when gatt is null#1297
Fix unfullfilled callbacks when gatt is null#1297marcosinigaglia merged 11 commits intoinnoveit:masterfrom
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 |
Backport innoveit#1297 for v11
This fixes issue #1291 and a null exception.