parent
7fdc6cefb3
commit
9cd18cc588
|
@ -0,0 +1 @@
|
||||||
|
Fix bug where federation requests were not correctly retried on 5xx responses.
|
|
@ -534,9 +534,10 @@ class MatrixFederationHttpClient:
|
||||||
response.code, response_phrase, body
|
response.code, response_phrase, body
|
||||||
)
|
)
|
||||||
|
|
||||||
# Retry if the error is a 429 (Too Many Requests),
|
# Retry if the error is a 5xx or a 429 (Too Many
|
||||||
# otherwise just raise a standard HttpResponseException
|
# Requests), otherwise just raise a standard
|
||||||
if response.code == 429:
|
# `HttpResponseException`
|
||||||
|
if 500 <= response.code < 600 or response.code == 429:
|
||||||
raise RequestSendFailed(exc, can_retry=True) from exc
|
raise RequestSendFailed(exc, can_retry=True) from exc
|
||||||
else:
|
else:
|
||||||
raise exc
|
raise exc
|
||||||
|
|
Loading…
Reference in New Issue