diff options
| author | Rapptz <[email protected]> | 2017-01-25 21:38:50 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2017-01-25 21:38:50 -0500 |
| commit | b876133e87b29a6959eb766d006fa6b57db1037e (patch) | |
| tree | 420643e1d71aaefc460f36ffe421c1a8108d54a3 /discord/gateway.py | |
| parent | Remove unused ChannelPermissions namedtuple. (diff) | |
| download | discord.py-b876133e87b29a6959eb766d006fa6b57db1037e.tar.xz discord.py-b876133e87b29a6959eb766d006fa6b57db1037e.zip | |
Add compatibility shim for asyncio.Future creation.
Should provide better support for uvloop.
Diffstat (limited to 'discord/gateway.py')
| -rw-r--r-- | discord/gateway.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/gateway.py b/discord/gateway.py index e88021c9..9897ca42 100644 --- a/discord/gateway.py +++ b/discord/gateway.py @@ -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 |