If we're out of retries just raise the OSError
This commit is contained in:
parent
e2f42597a5
commit
137ff34f3a
@ -246,10 +246,9 @@ class HTTPClient:
|
|||||||
# This is handling exceptions from the request
|
# This is handling exceptions from the request
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
# Connection reset by peer
|
# Connection reset by peer
|
||||||
if e.errno in (54, 10054):
|
if tries < 4 and e.errno in (54, 10054):
|
||||||
# Just re-do the request
|
|
||||||
continue
|
continue
|
||||||
|
raise
|
||||||
|
|
||||||
# We've run out of retries, raise.
|
# We've run out of retries, raise.
|
||||||
raise HTTPException(r, data)
|
raise HTTPException(r, data)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user