mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
make FederationClient._do_send_leave async
This commit is contained in:
parent
e88b90aaeb
commit
abadf44eb2
@ -770,12 +770,11 @@ class FederationClient(FederationBase):
|
|||||||
"send_leave", destinations, send_request
|
"send_leave", destinations, send_request
|
||||||
)
|
)
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
async def _do_send_leave(self, destination, pdu):
|
||||||
def _do_send_leave(self, destination, pdu):
|
|
||||||
time_now = self._clock.time_msec()
|
time_now = self._clock.time_msec()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
content = yield self.transport_layer.send_leave_v2(
|
content = await self.transport_layer.send_leave_v2(
|
||||||
destination=destination,
|
destination=destination,
|
||||||
room_id=pdu.room_id,
|
room_id=pdu.room_id,
|
||||||
event_id=pdu.event_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")
|
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,
|
destination=destination,
|
||||||
room_id=pdu.room_id,
|
room_id=pdu.room_id,
|
||||||
event_id=pdu.event_id,
|
event_id=pdu.event_id,
|
||||||
|
Loading…
Reference in New Issue
Block a user