mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-05 09:26:10 +00:00
Retry on 500 in HTTPClient.request
Discord official client retries on 500, so worst case scenario, we're not any worse than the official client which seriously outnumbers us.
This commit is contained in:
@ -193,8 +193,8 @@ class HTTPClient:
|
||||
|
||||
continue
|
||||
|
||||
# we've received a 502, unconditional retry
|
||||
if r.status == 502 and tries <= 5:
|
||||
# we've received a 500 or 502, unconditional retry
|
||||
if r.status in {500, 502} and tries <= 5:
|
||||
yield from asyncio.sleep(1 + tries * 2, loop=self.loop)
|
||||
continue
|
||||
|
||||
|
Reference in New Issue
Block a user