Просмотр исходного кода

Remove direct coroutine call (#557)

Python 3.11 forbids direct calls to coroutines.
Serge Rogatch 2 лет назад
Родитель
Сommit
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,
             )