mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-08 05:44:59 -04:00
Add a keyword argument to get_json to avoid retrying on DNS failures. Rather than passing MatrixHttpClient.RETRY_DNS_LOOKUP_FAILURES as a fake query string parameter
This commit is contained in:
parent
9435830351
commit
574377636e
6 changed files with 16 additions and 20 deletions
|
@ -159,7 +159,8 @@ class ReplicationLayer(object):
|
|||
return defer.succeed(None)
|
||||
|
||||
@log_function
|
||||
def make_query(self, destination, query_type, args):
|
||||
def make_query(self, destination, query_type, args,
|
||||
retry_on_dns_fail=True):
|
||||
"""Sends a federation Query to a remote homeserver of the given type
|
||||
and arguments.
|
||||
|
||||
|
@ -174,7 +175,9 @@ class ReplicationLayer(object):
|
|||
a Deferred which will eventually yield a JSON object from the
|
||||
response
|
||||
"""
|
||||
return self.transport_layer.make_query(destination, query_type, args)
|
||||
return self.transport_layer.make_query(
|
||||
destination, query_type, args, retry_on_dns_fail=retry_on_dns_fail
|
||||
)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
@log_function
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue