Browse Source

Add tries check to 500 code

pull/10287/head
imp 2 months ago
committed by GitHub
parent
commit
c3885eb6ee
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      discord/http.py

2
discord/http.py

@ -721,7 +721,7 @@ class HTTPClient:
_log.warning(fmt, method, url, retry_after)
# We've received a 500, 502, 504, or 524, unconditional retry
elif response.status in {500, 502, 504, 524}:
elif response.status in {500, 502, 504, 524} and tries < 4:
await asyncio.sleep(1 + tries * 2)
continue

Loading…
Cancel
Save