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:
SomberNight
2022-04-26 18:05:45 +02:00
parent 6d049a30f2
commit b7dd51612e
2 changed files with 8 additions and 7 deletions

View File

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