summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2020-02-03 21:07:38 +0000
committerRichard van der Hoff <richard@matrix.org>2020-02-03 22:28:45 +0000
commit3960527c2e1d9bbeb2f0f7b6218de06cd32bdcb4 (patch)
tree1d487099a7d807b33f79c456870667eb69d35b97 /synapse
parentmake FederationClient.make_membership_event.send_request async (diff)
downloadsynapse-3960527c2e1d9bbeb2f0f7b6218de06cd32bdcb4.tar.xz
make FederationClient.send_join.send_request async
Diffstat (limited to 'synapse')
-rw-r--r--synapse/federation/federation_client.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/synapse/federation/federation_client.py b/synapse/federation/federation_client.py
index b59d08c4ae..8ca36c4d32 100644
--- a/synapse/federation/federation_client.py
+++ b/synapse/federation/federation_client.py
@@ -553,9 +553,8 @@ class FederationClient(FederationBase):
                     "room appears to have unsupported version %s" % (room_version,)
                 )
 
-        @defer.inlineCallbacks
-        def send_request(destination):
-            content = yield self._do_send_join(destination, pdu)
+        async def send_request(destination) -> Dict[str, Any]:
+            content = await self._do_send_join(destination, pdu)
 
             logger.debug("Got content: %s", content)
 
@@ -584,7 +583,7 @@ class FederationClient(FederationBase):
                 # invalid, and it would fail auth checks anyway.
                 raise SynapseError(400, "No create event in state")
 
-            valid_pdus = yield self._check_sigs_and_hash_and_fetch(
+            valid_pdus = await self._check_sigs_and_hash_and_fetch(
                 destination,
                 list(pdus.values()),
                 outlier=True,