mirror of
https://github.com/esphome/aioesphomeapi.git
synced 2024-11-14 10:45:13 +01:00
Only start task if existing one is done (#337)
This commit is contained in:
parent
6d4b9df969
commit
3e99cd3177
@ -151,7 +151,7 @@ class APIConnection:
|
||||
# themself, effectively ending execution after _cleanup which may be unexpected
|
||||
self._ping_stop_event.set()
|
||||
|
||||
if not self._cleanup_task or not self._cleanup_task.done():
|
||||
if not self._cleanup_task or self._cleanup_task.done():
|
||||
self._cleanup_task = asyncio.create_task(_do_cleanup())
|
||||
|
||||
async def _connect_resolve_host(self) -> hr.AddrInfo:
|
||||
|
Loading…
Reference in New Issue
Block a user