summary refs log tree commit diff
path: root/synapse/server.py
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2019-03-05 18:41:27 +0000
committerBrendan Abolivier <babolivier@matrix.org>2019-03-05 18:41:27 +0000
commitd7dbad3526136cfc9fdbd568635be5016fb637db (patch)
tree531764768f634bb73b1a31f9f5a3a6e3b0ac2aa5 /synapse/server.py
parentUpdate sample config (diff)
downloadsynapse-d7dbad3526136cfc9fdbd568635be5016fb637db.tar.xz
Split ratelimiters in two (one for events, one for registration)
Diffstat (limited to 'synapse/server.py')
-rw-r--r--synapse/server.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/synapse/server.py b/synapse/server.py
index 4323e7ff12..f3ca3e259a 100644
--- a/synapse/server.py
+++ b/synapse/server.py
@@ -205,7 +205,8 @@ class HomeServer(object):
 
         self.clock = Clock(reactor)
         self.distributor = Distributor()
-        self.ratelimiter = Ratelimiter()
+        self.events_ratelimiter = Ratelimiter()
+        self.registration_ratelimiter = Ratelimiter()
 
         self.datastore = None
 
@@ -248,8 +249,11 @@ class HomeServer(object):
     def get_distributor(self):
         return self.distributor
 
-    def get_ratelimiter(self):
-        return self.ratelimiter
+    def get_events_ratelimiter(self):
+        return self.events_ratelimiter
+
+    def get_registration_ratelimiter(self):
+        return self.registration_ratelimiter
 
     def build_federation_client(self):
         return FederationClient(self)