You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is an issue where the plugin first calls the success callback and later the failure callback. I would expect that either the success or failure callback fires, not both.
evothings.ble.connectToDevice(device,function(){// called first},function(){// never called},function(errorCode){// called second})
The logic to reproduce:
Try to connect to device
GattHandler#onConnectionStateChange is called with GATT_SUCCESS and STATE_CONNECTED.
GattHandler sends a message back to the JavaScript code which triggers the success callback.
After some time the device is disconnected (e.g. turned off).
GattHandler#onConnectionStateChange is called with !GATT_SUCCESS (the status argument is not GATT_SUCCESS) and STATE_DISCONNECTED.
GattHandler now calls callbackContext.error triggering the failure callback in the JavaScript code.
I've experienced this a couple of times.
The text was updated successfully, but these errors were encountered:
There is an issue where the plugin first calls the success callback and later the failure callback. I would expect that either the success or failure callback fires, not both.
The logic to reproduce:
GattHandler#onConnectionStateChange
is called withGATT_SUCCESS
andSTATE_CONNECTED
.GattHandler
sends a message back to the JavaScript code which triggers the success callback.After some time the device is disconnected (e.g. turned off).
GattHandler#onConnectionStateChange
is called with!GATT_SUCCESS
(the status argument is notGATT_SUCCESS
) andSTATE_DISCONNECTED
.GattHandler
now callscallbackContext.error
triggering the failure callback in the JavaScript code.I've experienced this a couple of times.
The text was updated successfully, but these errors were encountered: