aboutsummaryrefslogtreecommitdiff
path: root/discord/client.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2017-01-25 21:38:50 -0500
committerRapptz <[email protected]>2017-01-25 21:38:50 -0500
commitb876133e87b29a6959eb766d006fa6b57db1037e (patch)
tree420643e1d71aaefc460f36ffe421c1a8108d54a3 /discord/client.py
parentRemove unused ChannelPermissions namedtuple. (diff)
downloaddiscord.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/client.py')
-rw-r--r--discord/client.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/discord/client.py b/discord/client.py
index d2819ce2..ec05cb20 100644
--- a/discord/client.py
+++ b/discord/client.py
@@ -678,7 +678,7 @@ class Client:
return result
- future = asyncio.Future(loop=self.loop)
+ future = compat.create_future(self.loop)
self._listeners.append((predicate, future, WaitForType.message))
try:
message = yield from asyncio.wait_for(future, timeout, loop=self.loop)
@@ -788,7 +788,7 @@ class Client:
return result
- future = asyncio.Future(loop=self.loop)
+ future = compat.create_future(self.loop)
self._listeners.append((predicate, future, WaitForType.reaction))
try:
return (yield from asyncio.wait_for(future, timeout, loop=self.loop))