summary refs log tree commit diff
path: root/synapse/util/retryutils.py
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2016-11-24 15:27:19 +0000
committerGitHub <noreply@github.com>2016-11-24 15:27:19 +0000
commit9192e593ec7a1501cda7df8ab79ecba586e5c3a2 (patch)
tree0c373f5d2d3e923065e2372018f1c0a4371bd4a4 /synapse/util/retryutils.py
parentBump version and changelog (diff)
parentUse correct var (diff)
downloadsynapse-9192e593ec7a1501cda7df8ab79ecba586e5c3a2.tar.xz
Merge pull request #1650 from matrix-org/erikj/respect_ratelimited
Correctly handle 500's and 429 on federation
Diffstat (limited to 'synapse/util/retryutils.py')
-rw-r--r--synapse/util/retryutils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/util/retryutils.py b/synapse/util/retryutils.py
index 46ef5a8ec7..e2de7fce91 100644
--- a/synapse/util/retryutils.py
+++ b/synapse/util/retryutils.py
@@ -123,7 +123,7 @@ class RetryDestinationLimiter(object):
     def __exit__(self, exc_type, exc_val, exc_tb):
         valid_err_code = False
         if exc_type is not None and issubclass(exc_type, CodeMessageException):
-            valid_err_code = 0 <= exc_val.code < 500
+            valid_err_code = exc_val.code != 429 and 0 <= exc_val.code < 500
 
         if exc_type is None or valid_err_code:
             # We connected successfully.