Merge pull request #2507 from jbr7rr/dash-close-gatt-on-disconnected
Dash close gatt on disconnected, Improving connection times
This commit is contained in:
commit
5e2614f9f6
1 changed files with 2 additions and 1 deletions
|
@ -200,7 +200,8 @@ class Connection(
|
||||||
// This will be called from a different thread !!!
|
// This will be called from a different thread !!!
|
||||||
override fun onConnectionLost(status: Int) {
|
override fun onConnectionLost(status: Int) {
|
||||||
aapsLogger.info(LTag.PUMPBTCOMM, "Lost connection with status: $status")
|
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 {
|
companion object {
|
||||||
|
|
Loading…
Reference in a new issue