Преглед изворни кода

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,
             )