From 37e5118fff1e63e5af0183e7900bb6a7bc708a34 Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Tue, 14 Jun 2022 17:52:30 +0300 Subject: Fixed aiotools.wait_infinite() Task was destroyed but it is pending! task: .wrapper() running at /kvmd/aiotools.py:85> wait_for=> --- kvmd/aiotools.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'kvmd/aiotools.py') 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]]: -- cgit v1.2.3