From c3885eb6ee2f62c0f3c43a416e2a451a2f9bd2b7 Mon Sep 17 00:00:00 2001 From: imp <106537315+imptype@users.noreply.github.com> Date: Mon, 1 Sep 2025 01:13:06 +0100 Subject: [PATCH] Add tries check to 500 code --- discord/http.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/http.py b/discord/http.py index 0ed8a9c7a..74dea612b 100644 --- a/discord/http.py +++ b/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