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
|
|
@ -17,8 +17,8 @@ android {
|
|||
applicationId "com.geeksville.mesh"
|
||||
minSdkVersion 21 // The oldest emulator image I have tried is 22 (though 21 probably works)
|
||||
targetSdkVersion 29
|
||||
versionCode 10787 // format is Mmmss (where M is 1+the numeric major number
|
||||
versionName "0.7.87"
|
||||
versionCode 10788 // format is Mmmss (where M is 1+the numeric major number
|
||||
versionName "0.7.88"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
buildTypes {
|
||||
|
|
|
|||
|
|
@ -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