Disconnect ble device if connect attempt fails to recover slot (#293)

This commit is contained in:
J. Nick Koston 2022-10-30 15:09:01 -05:00 committed by GitHub
parent c6955e7629
commit 56cceea672
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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