diff options
| author | Rapptz <[email protected]> | 2015-12-15 21:00:11 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2015-12-15 21:00:11 -0500 |
| commit | 491d508a97123080763c9d8ac65e866e35c3e04d (patch) | |
| tree | 67a2df4c5d1242bffb1cb527f78f2c7b25601cab | |
| parent | Add a way to get all active invites from a server. (diff) | |
| download | discord.py-491d508a97123080763c9d8ac65e866e35c3e04d.tar.xz discord.py-491d508a97123080763c9d8ac65e866e35c3e04d.zip | |
Cast Retry-After header into a float.
| -rw-r--r-- | discord/client.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/client.py b/discord/client.py index 8483d438..ad6dcd31 100644 --- a/discord/client.py +++ b/discord/client.py @@ -791,7 +791,7 @@ class Client: log_fmt = 'In {}, {}'.format(name, tmp) log.debug(log_fmt) if resp.status == 429: - retry = resp.headers['Retry-After'] / 1000.0 + retry = float(resp.headers['Retry-After']) / 1000.0 yield from resp.release() yield from asyncio.sleep(retry) return (yield from self._rate_limit_helper(name, method, data)) |