Преглед на файлове

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