kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
don't spam crashlytics with non-bug reports
rodzic
4571eeea2a
commit
0349e823f8
|
@ -169,6 +169,7 @@ class BluetoothInterface(val service: RadioInterfaceService, val address: String
|
||||||
* this is created in onCreate()
|
* this is created in onCreate()
|
||||||
* We do an ugly hack of keeping it in the singleton so we can share it for the rare software update case
|
* We do an ugly hack of keeping it in the singleton so we can share it for the rare software update case
|
||||||
*/
|
*/
|
||||||
|
@Volatile
|
||||||
var safe: SafeBluetooth? = null
|
var safe: SafeBluetooth? = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -332,7 +333,10 @@ class BluetoothInterface(val service: RadioInterfaceService, val address: String
|
||||||
delay(1000) // Give some nasty time for buggy BLE stacks to shutdown (500ms was not enough)
|
delay(1000) // Give some nasty time for buggy BLE stacks to shutdown (500ms was not enough)
|
||||||
reconnectJob = null // Any new reconnect requests after this will be allowed to run
|
reconnectJob = null // Any new reconnect requests after this will be allowed to run
|
||||||
warn("Attempting reconnect")
|
warn("Attempting reconnect")
|
||||||
startConnect()
|
if (safe != null) // check again, because we just slept for 1sec, and someone might have closed our interface
|
||||||
|
startConnect()
|
||||||
|
else
|
||||||
|
warn("Not connecting, because safe==null, someone must have closed us")
|
||||||
} else {
|
} else {
|
||||||
warn("Abandoning reconnect because safe==null, someone must have closed the device")
|
warn("Abandoning reconnect because safe==null, someone must have closed the device")
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue