aboutsummaryrefslogtreecommitdiff
path: root/discord/client.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2016-12-21 00:01:00 -0500
committerRapptz <[email protected]>2016-12-21 00:06:19 -0500
commitbed2e90e825f9cf90fc1ecbae3f49472de05ad3c (patch)
tree655476debe560028148b63ce645aef69f2eeed4c /discord/client.py
parentVersion bump to v0.16.0. (diff)
downloaddiscord.py-bed2e90e825f9cf90fc1ecbae3f49472de05ad3c.tar.xz
discord.py-bed2e90e825f9cf90fc1ecbae3f49472de05ad3c.zip
Properly propagate loop. Fixes #420.
Diffstat (limited to 'discord/client.py')
-rw-r--r--discord/client.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/discord/client.py b/discord/client.py
index 8cfe48ef..f8cd4c32 100644
--- a/discord/client.py
+++ b/discord/client.py
@@ -519,8 +519,8 @@ class Client:
self.loop.run_until_complete(self.start(*args, **kwargs))
except KeyboardInterrupt:
self.loop.run_until_complete(self.logout())
- pending = asyncio.Task.all_tasks()
- gathered = asyncio.gather(*pending)
+ pending = asyncio.Task.all_tasks(loop=self.loop)
+ gathered = asyncio.gather(*pending, loop=self.loop)
try:
gathered.cancel()
self.loop.run_until_complete(gathered)
@@ -1393,7 +1393,7 @@ class Client:
to_delete = ret[-100:]
yield from self.delete_messages(to_delete)
count = 0
- yield from asyncio.sleep(1)
+ yield from asyncio.sleep(1, loop=self.loop)
if check(msg):
count += 1