浏览代码

Remove direct coroutine call (#557)

Python 3.11 forbids direct calls to coroutines.
Serge Rogatch 2 年之前
父节点
当前提交
351abc5ac0
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      hivemind/dht/node.py

+ 1 - 1
hivemind/dht/node.py

@@ -254,7 +254,7 @@ class DHTNode:
             await asyncio.wait(
                 [
                     asyncio.create_task(self.find_nearest_nodes([self.node_id])),
-                    asyncio.sleep(bootstrap_timeout - get_dht_time() + start_time),
+                    asyncio.create_task(asyncio.sleep(bootstrap_timeout - get_dht_time() + start_time)),
                 ],
                 return_when=asyncio.FIRST_COMPLETED,
             )