react-native-ble-manager 8.0.0 → 8.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -315,14 +315,11 @@ public class Peripheral extends BluetoothGattCallback {
|
|
|
315
315
|
|
|
316
316
|
} else if (newState == BluetoothProfile.STATE_DISCONNECTED) {
|
|
317
317
|
|
|
318
|
-
this.disconnect(true);
|
|
319
|
-
|
|
320
318
|
if (discoverServicesRunnable != null) {
|
|
321
319
|
mainHandler.removeCallbacks(discoverServicesRunnable);
|
|
322
320
|
discoverServicesRunnable = null;
|
|
323
321
|
}
|
|
324
322
|
|
|
325
|
-
sendConnectionEvent(device, "BleManagerDisconnectPeripheral", status);
|
|
326
323
|
List<Callback> callbacks = Arrays.asList(writeCallback, retrieveServicesCallback, readRSSICallback,
|
|
327
324
|
readCallback, registerNotifyCallback, requestMTUCallback);
|
|
328
325
|
for (Callback currentCallback : callbacks) {
|
|
@@ -343,6 +340,8 @@ public class Peripheral extends BluetoothGattCallback {
|
|
|
343
340
|
requestMTUCallback = null;
|
|
344
341
|
commandQueue.clear();
|
|
345
342
|
commandQueueBusy = false;
|
|
343
|
+
|
|
344
|
+
this.disconnect(true);
|
|
346
345
|
}
|
|
347
346
|
|
|
348
347
|
}
|