summary refs log tree commit diff
path: root/synapse/federation/federation_client.py
diff options
context:
space:
mode:
authorMark Haines <mjark@negativecurvature.net>2016-09-13 10:50:45 +0100
committerGitHub <noreply@github.com>2016-09-13 10:50:45 +0100
commit76b09c29b0715fb8c5c7176acf0c3ae9bb6a2b55 (patch)
tree673b516a0d7649d0188643f909a11c5eb208bc47 /synapse/federation/federation_client.py
parentMerge pull request #1109 from matrix-org/erikj/partial_indices (diff)
parentAdd a timeout parameter for end2end key queries. (diff)
downloadsynapse-76b09c29b0715fb8c5c7176acf0c3ae9bb6a2b55.tar.xz
Merge pull request #1110 from matrix-org/markjh/e2e_timeout
Add a timeout parameter for end2end key queries.
Diffstat (limited to 'synapse/federation/federation_client.py')
-rw-r--r--synapse/federation/federation_client.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/synapse/federation/federation_client.py b/synapse/federation/federation_client.py

index fe01281c95..91bed4746f 100644 --- a/synapse/federation/federation_client.py +++ b/synapse/federation/federation_client.py
@@ -176,7 +176,7 @@ class FederationClient(FederationBase): ) @log_function - def query_client_keys(self, destination, content): + def query_client_keys(self, destination, content, timeout): """Query device keys for a device hosted on a remote server. Args: @@ -188,10 +188,12 @@ class FederationClient(FederationBase): response """ sent_queries_counter.inc("client_device_keys") - return self.transport_layer.query_client_keys(destination, content) + return self.transport_layer.query_client_keys( + destination, content, timeout + ) @log_function - def claim_client_keys(self, destination, content): + def claim_client_keys(self, destination, content, timeout): """Claims one-time keys for a device hosted on a remote server. Args: @@ -203,7 +205,9 @@ class FederationClient(FederationBase): response """ sent_queries_counter.inc("client_one_time_keys") - return self.transport_layer.claim_client_keys(destination, content) + return self.transport_layer.claim_client_keys( + destination, content, timeout + ) @defer.inlineCallbacks @log_function