summary refs log tree commit diff
path: root/synapse/federation
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2020-02-03 21:08:24 +0000
committerRichard van der Hoff <richard@matrix.org>2020-02-03 22:28:45 +0000
commit638001116de3e472d916f8e809e15c658bab282a (patch)
treebf5d10e6c7255526c523598059f8d2ad379fabb8 /synapse/federation
parentmake FederationClient.send_join.send_request async (diff)
downloadsynapse-638001116de3e472d916f8e809e15c658bab282a.tar.xz
make FederationClient._do_send_join async
Diffstat (limited to 'synapse/federation')
-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 8ca36c4d32..b4609b78cb 100644
--- a/synapse/federation/federation_client.py
+++ b/synapse/federation/federation_client.py
@@ -621,12 +621,11 @@ class FederationClient(FederationBase):
 
         return await self._try_destination_list("send_join", destinations, send_request)
 
-    @defer.inlineCallbacks
-    def _do_send_join(self, destination, pdu):
+    async def _do_send_join(self, destination: str, pdu: EventBase):
         time_now = self._clock.time_msec()
 
         try:
-            content = yield self.transport_layer.send_join_v2(
+            content = await self.transport_layer.send_join_v2(
                 destination=destination,
                 room_id=pdu.room_id,
                 event_id=pdu.event_id,
@@ -648,7 +647,7 @@ class FederationClient(FederationBase):
 
         logger.debug("Couldn't send_join with the v2 API, falling back to the v1 API")
 
-        resp = yield self.transport_layer.send_join_v1(
+        resp = await self.transport_layer.send_join_v1(
             destination=destination,
             room_id=pdu.room_id,
             event_id=pdu.event_id,