Add compatibility shim for asyncio.Future creation.
Should provide better support for uvloop.
This commit is contained in:
@ -234,7 +234,7 @@ class DiscordWebSocket(websockets.client.WebSocketClientProtocol):
|
||||
A future to wait for.
|
||||
"""
|
||||
|
||||
future = asyncio.Future(loop=self.loop)
|
||||
future = compat.create_future(self.loop)
|
||||
entry = EventListener(event=event, predicate=predicate, result=result, future=future)
|
||||
self._dispatch_listeners.append(entry)
|
||||
return future
|
||||
|
Reference in New Issue
Block a user