0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-17 20:33:57 +01:00

Limit concurrent event sends for a room

This commit is contained in:
Erik Johnston 2018-04-09 12:07:39 +01:00
parent 56b0589865
commit e5082494eb

View file

@ -454,7 +454,6 @@ class EventCreationHandler(object):
""" """
builder = self.event_builder_factory.new(event_dict) builder = self.event_builder_factory.new(event_dict)
with (yield self.limiter.queue(builder.room_id)):
self.validator.validate_new(builder) self.validator.validate_new(builder)
if builder.type == EventTypes.Member: if builder.type == EventTypes.Member:
@ -557,6 +556,8 @@ class EventCreationHandler(object):
See self.create_event and self.send_nonmember_event. See self.create_event and self.send_nonmember_event.
""" """
with (yield self.limiter.queue(event_dict["room_id"])):
event, context = yield self.create_event( event, context = yield self.create_event(
requester, requester,
event_dict, event_dict,