mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
0.7.88 oops - if no work is pending, we also try to reconnect
This commit is contained in:
parent
dde5348b3a
commit
5f34fcba17
2 changed files with 5 additions and 3 deletions
|
|
@ -162,7 +162,9 @@ class SafeBluetooth(private val context: Context, private val device: BluetoothD
|
|||
info("Lost connection - aborting current work: $currentWork")
|
||||
|
||||
// If we get a disconnect, just try again otherwise fail all current operations
|
||||
if (currentWork?.isConnect() == true)
|
||||
// Note: if no work is pending (likely) we also just totally teardown and restart the connection, because we won't be
|
||||
// throwing a lost connection exception to any worker.
|
||||
if (currentWork == null || currentWork?.isConnect() == true)
|
||||
dropAndReconnect()
|
||||
else
|
||||
lostConnection("lost connection")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue