dash ble: disconnect on errors
This commit is contained in:
parent
64aa05f7f9
commit
db51b762ca
|
@ -214,13 +214,14 @@ class OmnipodDashBleManagerImpl @Inject constructor(
|
|||
|
||||
emitter.onComplete()
|
||||
} catch (ex: Exception) {
|
||||
disconnect()
|
||||
emitter.tryOnError(ex)
|
||||
}
|
||||
}
|
||||
|
||||
override fun disconnect() {
|
||||
val localGatt = gatt
|
||||
localGatt?.close()
|
||||
localGatt?.close() // TODO: use disconnect?
|
||||
gatt = null
|
||||
msgIO = null
|
||||
sessionKeys = null
|
||||
|
|
Loading…
Reference in a new issue