Retry with fresh socket on 499
Change-Id: I0c22eefb587375997672724c03744c9cda473708
This commit is contained in:
parent
7bd0951086
commit
ff6b359d06
@ -1821,7 +1821,9 @@ class Connection:
|
|||||||
retried_auth = True
|
retried_auth = True
|
||||||
elif self.attempts > self.retries or err.http_status is None:
|
elif self.attempts > self.retries or err.http_status is None:
|
||||||
raise
|
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
|
self.http_conn = None
|
||||||
elif 500 <= err.http_status <= 599:
|
elif 500 <= err.http_status <= 599:
|
||||||
pass
|
pass
|
||||||
|
@ -2224,6 +2224,7 @@ class TestConnection(MockHttpTest):
|
|||||||
do_test(401, 2)
|
do_test(401, 2)
|
||||||
# others will be tried until retry limits
|
# others will be tried until retry limits
|
||||||
do_test(408, 6)
|
do_test(408, 6)
|
||||||
|
do_test(499, 6)
|
||||||
do_test(500, 6)
|
do_test(500, 6)
|
||||||
do_test(503, 6)
|
do_test(503, 6)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user