aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2015-12-15 21:00:11 -0500
committerRapptz <[email protected]>2015-12-15 21:00:11 -0500
commit491d508a97123080763c9d8ac65e866e35c3e04d (patch)
tree67a2df4c5d1242bffb1cb527f78f2c7b25601cab
parentAdd a way to get all active invites from a server. (diff)
downloaddiscord.py-491d508a97123080763c9d8ac65e866e35c3e04d.tar.xz
discord.py-491d508a97123080763c9d8ac65e866e35c3e04d.zip
Cast Retry-After header into a float.
-rw-r--r--discord/client.py2
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))