1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/handlers/room_member.py b/synapse/handlers/room_member.py
index 0785e31114..802e57c4d0 100644
--- a/synapse/handlers/room_member.py
+++ b/synapse/handlers/room_member.py
@@ -515,8 +515,8 @@ class RoomMemberHandler(metaclass=abc.ABCMeta):
# We first linearise by the application service (to try to limit concurrent joins
# by application services), and then by room ID.
- with (await self.member_as_limiter.queue(as_id)):
- with (await self.member_linearizer.queue(key)):
+ async with self.member_as_limiter.queue(as_id):
+ async with self.member_linearizer.queue(key):
result = await self.update_membership_locked(
requester,
target,
|