mirror of
https://github.com/esphome/aioesphomeapi.git
synced 2024-12-22 16:48:04 +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:
|
||||
unsub()
|
||||
raise TimeoutAPIError("Timeout waiting for connect response") from err
|
||||
finally:
|
||||
if not event.is_set():
|
||||
await self.bluetooth_device_disconnect(address)
|
||||
|
||||
return unsub
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user