-
Notifications
You must be signed in to change notification settings - Fork 192
Description
Note! This ticket will capture any and all issues relating to Python SDK BLE:
- recovery from failures to establish connection
- recovery from connection drops
- closing and re-opening Wired / Wireless GoPro objecvts
In general, these use cases have not yet been designed for / tested against and I'm not sure much of this is even solvable in the Python SDK due to the lack of robustness in Bleak and the OS's BLE stack. But it needs a major investigation on each operating system.
Component
In the Python SDK.
Describe the bug
If the connection to a GoPro fails, the WirelessGoPro._periodic_keep_alive coroutine is left open.
To Reproduce
Start connection to a GoPro and have it fail (stop ble adapter or remove GoPro battery)
Then we can observe _periodic_keep_alive by checking the running coroutines:
tasks = asyncio.all_tasks()
coroutine_name = task.get_coro().qualname
Expected behavior
I would expect the keepalive to be stopped once the Connection fails.
Hardware
Hero 11
Linux 6
Additional context
I'll try to investigate later if this can be solved by initiating connection within a contextlib.AsyncExitStack().
Metadata
Metadata
Assignees
Labels
Type
Projects
Status