summary refs log tree commit diff
path: root/synapse/http/matrixfederationclient.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2021-04-23 17:28:25 +0100
committerAndrew Morgan <andrew@amorgan.xyz>2021-04-23 17:28:25 +0100
commitf9b719fcbebc46dea2ec4086bc5a24494b014b1e (patch)
tree8aad034aaecdc9903cc5e08293bccd9dd9f7a590 /synapse/http/matrixfederationclient.py
parentMerge commit '7fdc6cefb' into anoa/dinsic_release_1_31_0 (diff)
parentFix a bug in the background task for purging chain cover. (#9583) (diff)
downloadsynapse-f9b719fcbebc46dea2ec4086bc5a24494b014b1e.tar.xz
Merge commit '918f6ed82' into anoa/dinsic_release_1_31_0
Diffstat (limited to 'synapse/http/matrixfederationclient.py')
-rw-r--r--synapse/http/matrixfederationclient.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/synapse/http/matrixfederationclient.py b/synapse/http/matrixfederationclient.py

index da6866addf..5f01ebd3d4 100644 --- a/synapse/http/matrixfederationclient.py +++ b/synapse/http/matrixfederationclient.py
@@ -534,9 +534,10 @@ class MatrixFederationHttpClient: response.code, response_phrase, body ) - # Retry if the error is a 429 (Too Many Requests), - # otherwise just raise a standard HttpResponseException - if response.code == 429: + # Retry if the error is a 5xx or a 429 (Too Many + # Requests), otherwise just raise a standard + # `HttpResponseException` + if 500 <= response.code < 600 or response.code == 429: raise RequestSendFailed(exc, can_retry=True) from exc else: raise exc