@autorunify/capacitor-nrfmesh 0.0.11 → 0.0.12
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.
|
@@ -477,10 +477,12 @@ class MeshManager {
|
|
|
477
477
|
}
|
|
478
478
|
|
|
479
479
|
fun disconnect() {
|
|
480
|
+
if(!isConnected) return
|
|
480
481
|
gatt.disconnect().timeout(2000).await()
|
|
481
482
|
}
|
|
482
483
|
|
|
483
484
|
fun connect(device: MeshDevice) {
|
|
485
|
+
if (isConnected) disconnect()
|
|
484
486
|
gatt.connect(device.device).retry(20, 500).await()
|
|
485
487
|
}
|
|
486
488
|
|