mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
ignore BLE errors while closing
This commit is contained in:
parent
2327c5e693
commit
cea7755aa4
3 changed files with 11 additions and 3 deletions
|
|
@ -469,7 +469,12 @@ class BluetoothInterface(val service: RadioInterfaceService, val address: String
|
|||
safe =
|
||||
null // We do this first, because if we throw we still want to mark that we no longer have a valid connection
|
||||
|
||||
s?.close()
|
||||
try {
|
||||
s?.close()
|
||||
}
|
||||
catch(_: BLEConnectionClosing) {
|
||||
warn("Ignoring BLE errors while closing")
|
||||
}
|
||||
} else {
|
||||
debug("Radio was not connected, skipping disable")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue