summaryrefslogtreecommitdiff
path: root/swiftclient
diff options
context:
space:
mode:
authorTim Burke <tim.burke@gmail.com>2023-02-15 21:00:51 -0800
committerTim Burke <tim.burke@gmail.com>2023-02-15 21:01:07 -0800
commitff6b359d066981861f35fbc31803321a6e6b3304 (patch)
tree1db6941780462ed09ff91a019cd7f89c4088d040 /swiftclient
parent7bd09510864e92265eb1e797ba5bba973e0ceb50 (diff)
downloadpython-swiftclient-ff6b359d066981861f35fbc31803321a6e6b3304.tar.gz
Retry with fresh socket on 499
Change-Id: I0c22eefb587375997672724c03744c9cda473708
Diffstat (limited to 'swiftclient')
-rw-r--r--swiftclient/client.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/swiftclient/client.py b/swiftclient/client.py
index e42ac70..b9f12aa 100644
--- a/swiftclient/client.py
+++ b/swiftclient/client.py
@@ -1821,7 +1821,9 @@ class Connection:
retried_auth = True
elif self.attempts > self.retries or err.http_status is None:
raise
- elif err.http_status == 408:
+ elif err.http_status in (408, 499):
+ # Server hit a timeout, so HTTP request/response framing
+ # are likely in a bad state; trash the connection
self.http_conn = None
elif 500 <= err.http_status <= 599:
pass