mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-19 23:44:29 +00:00
Cast Retry-After header into a float.
This commit is contained in:
parent
00a98a76fd
commit
491d508a97
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user