mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 09:10:30 +08:00
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()]>>
This commit is contained in:
parent
e050bbd725
commit
37e5118fff
@ -119,7 +119,8 @@ def run_sync(coro: Coroutine[Any, Any, _RetvalT]) -> _RetvalT:
|
|||||||
|
|
||||||
# =====
|
# =====
|
||||||
async def wait_infinite() -> None:
|
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]]:
|
async def wait_first(*aws: Awaitable) -> Tuple[Set[asyncio.Task], Set[asyncio.Task]]:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user