summary refs log tree commit diff
path: root/synapse/federation/federation_client.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2020-02-03 21:09:07 +0000
committerRichard van der Hoff <richard@matrix.org>2020-02-03 22:28:45 +0000
commitabadf44eb2c32c9a6f1da84239043755f854b327 (patch)
tree0e7c54accd545b0b07099abe19fba9e20f30d233 /synapse/federation/federation_client.py
parentmake FederationClient.send_leave.send_request async (diff)
downloadsynapse-abadf44eb2c32c9a6f1da84239043755f854b327.tar.xz
make FederationClient._do_send_leave async
Diffstat (limited to 'synapse/federation/federation_client.py')
-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 f98c36039d..5043220d14 100644
--- a/synapse/federation/federation_client.py
+++ b/synapse/federation/federation_client.py
@@ -770,12 +770,11 @@ class FederationClient(FederationBase):
             "send_leave", destinations, send_request
         )
 
-    @defer.inlineCallbacks
-    def _do_send_leave(self, destination, pdu):
+    async def _do_send_leave(self, destination, pdu):
         time_now = self._clock.time_msec()
 
         try:
-            content = yield self.transport_layer.send_leave_v2(
+            content = await self.transport_layer.send_leave_v2(
                 destination=destination,
                 room_id=pdu.room_id,
                 event_id=pdu.event_id,
@@ -797,7 +796,7 @@ class FederationClient(FederationBase):
 
         logger.debug("Couldn't send_leave with the v2 API, falling back to the v1 API")
 
-        resp = yield self.transport_layer.send_leave_v1(
+        resp = await self.transport_layer.send_leave_v1(
             destination=destination,
             room_id=pdu.room_id,
             event_id=pdu.event_id,