Reconnection on disconnection when forceMock == false
does not work due
#113
Labels
bug
Something isn't working
forceMock == false
does not work due
#113
Hey,
The problem is that when the delegate call
central manager (_:diddisconnectperipheral:error:)
is handled, we would like to use it to automatically "reconnect" by callingcentralManager.connect(peripheral)
since attempts to connect to a peripheral don’t time out.But it does not work, as after digging into the issue, the underlying
CBPeripheral
s are stored by theCBMCentralManagerNative
which is removed ondidDisconnectPeripheral
so whenconnect
is called it is blocked the if statement as the peripheral is no longer hold in the dictionary.Potentially a quick fix could be:
But I guess, the biggest issue is that
CBPeripherals
are strongly hold byCBMCentralManagerNative
in overall.The text was updated successfully, but these errors were encountered: