summaryrefslogtreecommitdiff
path: root/kvmd/aiotools.py
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2022-06-14 17:52:30 +0300
committerMaxim Devaev <[email protected]>2022-06-14 17:52:30 +0300
commit37e5118fff1e63e5af0183e7900bb6a7bc708a34 (patch)
tree16a871571fb9d8cbff9d95696580ad31379bac0c /kvmd/aiotools.py
parente050bbd725d2670cacf595632c82f9b84e555ac4 (diff)
Fixed aiotools.wait_infinite()
Task was destroyed but it is pending! task: <Task pending name='Task-12' coro=<create_deadly_task.<locals>.wrapper() running at /kvmd/aiotools.py:85> wait_for=<Future pending cb=[Task.task_wakeup()]>>
Diffstat (limited to 'kvmd/aiotools.py')
-rw-r--r--kvmd/aiotools.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/kvmd/aiotools.py b/kvmd/aiotools.py
index add405f8..125e2779 100644
--- a/kvmd/aiotools.py
+++ b/kvmd/aiotools.py
@@ -119,7 +119,8 @@ def run_sync(coro: Coroutine[Any, Any, _RetvalT]) -> _RetvalT:
# =====
async def wait_infinite() -> None:
- await asyncio.get_event_loop().create_future()
+ while True:
+ await asyncio.sleep(3600)
async def wait_first(*aws: Awaitable) -> Tuple[Set[asyncio.Task], Set[asyncio.Task]]: