Trigger service discovery if interrupted in onConnectionUpdated#610
Trigger service discovery if interrupted in onConnectionUpdated#610cwgthornton wants to merge 1 commit intonordicsemi:mainfrom
onConnectionUpdated#610Conversation
It appears that when a service discovery is in progress and `onConnectionUpdated` is called, the service discovery callback `onServicesDiscovered` is never invoked. By checking to see `serviceDiscoverRequested` is set, we can restart the service discovery and get a result back. This may potentially fix nordicsemi#536, but I was seeing this behaviour consistently when connecting to another BLE device
|
|
|
Hi! |
|
No worries - the issue I was seeing is that it looked like sometimes I would never get onServicesDiscovered called if I got an onConnectionUpdated. While this made my connection code slightly more reliable, eventually I'd just get into a state where you had to toggle the bt adatper on/off to get it to work again (I was constantly connecting/disconnecting from devices), so I ended up pivoting away for bluetooth |
It appears that when a service discovery is in progress and
onConnectionUpdatedis called, the service discovery callbackonServicesDiscoveredis never invoked. By checking to seeserviceDiscoverRequestedis set, we can restart the service discovery and get a result back.This may potentially fix #536, but I was seeing this behaviour consistently when connecting to another BLE device