aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--discord/http.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/discord/http.py b/discord/http.py
index 2d3bb8e1..bddf56e3 100644
--- a/discord/http.py
+++ b/discord/http.py
@@ -194,7 +194,7 @@ class HTTPClient:
continue
# we've received a 500 or 502, unconditional retry
- if r.status in {500, 502} and tries <= 5:
+ if r.status in {500, 502}:
yield from asyncio.sleep(1 + tries * 2, loop=self.loop)
continue
@@ -208,6 +208,8 @@ class HTTPClient:
finally:
# clean-up just in case
yield from r.release()
+ # We've run out of retries, raise.
+ raise HTTPException(r, data)
def get_attachment(self, url):
resp = yield from self._session.get(url)