diff options
| author | Rapptz <[email protected]> | 2016-12-21 00:01:00 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2016-12-21 00:06:19 -0500 |
| commit | bed2e90e825f9cf90fc1ecbae3f49472de05ad3c (patch) | |
| tree | 655476debe560028148b63ce645aef69f2eeed4c /discord/http.py | |
| parent | Version bump to v0.16.0. (diff) | |
| download | discord.py-bed2e90e825f9cf90fc1ecbae3f49472de05ad3c.tar.xz discord.py-bed2e90e825f9cf90fc1ecbae3f49472de05ad3c.zip | |
Properly propagate loop. Fixes #420.
Diffstat (limited to 'discord/http.py')
| -rw-r--r-- | discord/http.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/discord/http.py b/discord/http.py index fdeaa478..38b7ff8e 100644 --- a/discord/http.py +++ b/discord/http.py @@ -120,12 +120,12 @@ class HTTPClient: # sleep a bit retry_after = data['retry_after'] / 1000.0 log.info(fmt.format(retry_after, bucket)) - yield from asyncio.sleep(retry_after) + yield from asyncio.sleep(retry_after, loop=self.loop) continue # we've received a 502, unconditional retry if r.status == 502 and tries <= 5: - yield from asyncio.sleep(1 + tries * 2) + yield from asyncio.sleep(1 + tries * 2, loop=self.loop) continue # the usual error cases |