Close gatt when BLE is disconnected
This commit is contained in:
parent
f896304af6
commit
59761364ea
|
@ -200,7 +200,8 @@ class Connection(
|
|||
// This will be called from a different thread !!!
|
||||
override fun onConnectionLost(status: Int) {
|
||||
aapsLogger.info(LTag.PUMPBTCOMM, "Lost connection with status: $status")
|
||||
disconnect(false)
|
||||
// This is called from onConnectionStateChange(), meaning BLE is already disconnected, so need to close gatt
|
||||
disconnect(true)
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
|
Loading…
Reference in a new issue