summary refs log tree commit diff
path: root/synapse/server.py
diff options
context:
space:
mode:
authorBrendan Abolivier <contact@brendanabolivier.com>2019-03-06 11:40:10 +0000
committerGitHub <noreply@github.com>2019-03-06 11:40:10 +0000
commit20dd3403eed144277a5b6c3561794d5028198a0e (patch)
treec6ba85a1c6738ac7afe21ac5f5c82eb9991eccbd /synapse/server.py
parentMerge pull request #4772 from jbweston/jbweston/server-version-api (diff)
parentMake registration ratelimiter separate from the main events one (diff)
downloadsynapse-20dd3403eed144277a5b6c3561794d5028198a0e.tar.xz
Merge pull request #4804 from matrix-org/babolivier/ratelimit_registration_improvements
Improve ratelimit on registration
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)