mirror of
https://github.com/esphome/aioesphomeapi.git
synced 2024-12-23 16:57:47 +01:00
Disconnect ble device if connect attempt fails to recover slot (#293)
This commit is contained in:
parent
c6955e7629
commit
56cceea672
@ -485,6 +485,9 @@ class APIClient:
|
|||||||
except asyncio.TimeoutError as err:
|
except asyncio.TimeoutError as err:
|
||||||
unsub()
|
unsub()
|
||||||
raise TimeoutAPIError("Timeout waiting for connect response") from err
|
raise TimeoutAPIError("Timeout waiting for connect response") from err
|
||||||
|
finally:
|
||||||
|
if not event.is_set():
|
||||||
|
await self.bluetooth_device_disconnect(address)
|
||||||
|
|
||||||
return unsub
|
return unsub
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user