From 137ff34f3ac69cbf652bc72d8f51c282010f72e0 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Sun, 3 May 2020 17:57:30 -0400 Subject: [PATCH] If we're out of retries just raise the OSError --- discord/http.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/discord/http.py b/discord/http.py index ceb6137af..4651490a5 100644 --- a/discord/http.py +++ b/discord/http.py @@ -246,10 +246,9 @@ class HTTPClient: # This is handling exceptions from the request except OSError as e: # Connection reset by peer - if e.errno in (54, 10054): - # Just re-do the request + if tries < 4 and e.errno in (54, 10054): continue - + raise # We've run out of retries, raise. raise HTTPException(r, data)