diff options
author | Richard van der Hoff <github@rvanderhoff.org.uk> | 2017-03-23 22:27:01 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-23 22:27:01 +0000 |
commit | 9397edb28bb9aa091d71728f24b2765180bda6ba (patch) | |
tree | 3e9e44ed68ef1fbe1ecc2b39599cd458294c2125 /synapse/federation/transport/client.py | |
parent | Merge pull request #2052 from matrix-org/rav/time_bound_deferred (diff) | |
parent | fix tests (diff) | |
download | synapse-9397edb28bb9aa091d71728f24b2765180bda6ba.tar.xz |
Merge pull request #2050 from matrix-org/rav/federation_backoff
push federation retry limiter down to matrixfederationclient
Diffstat (limited to 'synapse/federation/transport/client.py')
-rw-r--r-- | synapse/federation/transport/client.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/synapse/federation/transport/client.py b/synapse/federation/transport/client.py index f49e8a2cc4..15a03378f5 100644 --- a/synapse/federation/transport/client.py +++ b/synapse/federation/transport/client.py @@ -163,6 +163,7 @@ class TransportLayerClient(object): data=json_data, json_data_callback=json_data_callback, long_retries=True, + backoff_on_404=True, # If we get a 404 the other side has gone ) logger.debug( @@ -174,7 +175,8 @@ class TransportLayerClient(object): @defer.inlineCallbacks @log_function - def make_query(self, destination, query_type, args, retry_on_dns_fail): + def make_query(self, destination, query_type, args, retry_on_dns_fail, + ignore_backoff=False): path = PREFIX + "/query/%s" % query_type content = yield self.client.get_json( @@ -183,6 +185,7 @@ class TransportLayerClient(object): args=args, retry_on_dns_fail=retry_on_dns_fail, timeout=10000, + ignore_backoff=ignore_backoff, ) defer.returnValue(content) @@ -242,6 +245,7 @@ class TransportLayerClient(object): destination=destination, path=path, data=content, + ignore_backoff=True, ) defer.returnValue(response) @@ -269,6 +273,7 @@ class TransportLayerClient(object): destination=remote_server, path=path, args=args, + ignore_backoff=True, ) defer.returnValue(response) |