kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
don't spam autobugs if we get an exception reading fromnum when the device is leaving
rodzic
8233f063ed
commit
92621e07aa
|
@ -176,7 +176,9 @@ class BluetoothInterface(val service: RadioInterfaceService, val address: String
|
|||
|
||||
|
||||
/// Our BLE device
|
||||
val device get() = safe?.gatt ?: throw RadioNotConnectedException("No GATT")
|
||||
val device
|
||||
get() = (safe ?: throw RadioNotConnectedException("No SafeBluetooth")).gatt
|
||||
?: throw RadioNotConnectedException("No GATT")
|
||||
|
||||
/// Our service - note - it is possible to get back a null response for getService if the device services haven't yet been found
|
||||
val bservice
|
||||
|
@ -314,11 +316,16 @@ class BluetoothInterface(val service: RadioInterfaceService, val address: String
|
|||
fromNumChanged = true
|
||||
debug("fromNum changed")
|
||||
service.serviceScope.handledLaunch {
|
||||
try {
|
||||
if (fromNumChanged) {
|
||||
fromNumChanged = false
|
||||
debug("fromNum changed, so we are reading new messages")
|
||||
doReadFromRadio(false)
|
||||
}
|
||||
} catch (e: RadioNotConnectedException) {
|
||||
// Don't report autobugs for this, getting an exception here is expected behavior
|
||||
errormsg("Ending FromNum read, radio not connected", e)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue