summary refs log tree commit diff
path: root/synapse/server.py
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2019-03-06 11:02:42 +0000
committerBrendan Abolivier <babolivier@matrix.org>2019-03-06 11:02:42 +0000
commit6f3cde8b2500aafad2438de7eddfc442ec5288c7 (patch)
treec6ba85a1c6738ac7afe21ac5f5c82eb9991eccbd /synapse/server.py
parentRevert "Split ratelimiters in two (one for events, one for registration)" (diff)
downloadsynapse-6f3cde8b2500aafad2438de7eddfc442ec5288c7.tar.xz
Make registration ratelimiter separate from the main events one
Diffstat (limited to 'synapse/server.py')
-rw-r--r--synapse/server.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/server.py b/synapse/server.py
index 4323e7ff12..72835e8c86 100644
--- a/synapse/server.py
+++ b/synapse/server.py
@@ -206,6 +206,7 @@ class HomeServer(object):
         self.clock = Clock(reactor)
         self.distributor = Distributor()
         self.ratelimiter = Ratelimiter()
+        self.registration_ratelimiter = Ratelimiter()
 
         self.datastore = None
 
@@ -251,6 +252,9 @@ class HomeServer(object):
     def get_ratelimiter(self):
         return self.ratelimiter
 
+    def get_registration_ratelimiter(self):
+        return self.registration_ratelimiter
+
     def build_federation_client(self):
         return FederationClient(self)