asyncio: use loop.create_future() instead of asyncio.Future()
from https://docs.python.org/3.10/library/asyncio-future.html#asyncio.Future : > the recommended way to create a Future object is to call loop.create_future(). > This way alternative event loop implementations can inject their own optimized implementations of a Future object.
This commit is contained in:
@@ -363,7 +363,7 @@ class Interface(Logger):
|
||||
LOGGING_SHORTCUT = 'i'
|
||||
|
||||
def __init__(self, *, network: 'Network', server: ServerAddr, proxy: Optional[dict]):
|
||||
self.ready = asyncio.Future()
|
||||
self.ready = network.asyncio_loop.create_future()
|
||||
self.got_disconnected = asyncio.Event()
|
||||
self.server = server
|
||||
Logger.__init__(self)
|
||||
|
||||
Reference in New Issue
Block a user