summary refs log tree commit diff
path: root/synapse/federation/federation_server.py
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2018-03-13 13:46:38 +0000
committerGitHub <noreply@github.com>2018-03-13 13:46:38 +0000
commit56e709857ce6f48197061dbb5597d90a75877051 (patch)
treeeb63a5f203e206a29eaae2fb29b10e8a01ea1de5 /synapse/federation/federation_server.py
parentMerge pull request #2980 from matrix-org/erikj/rm_priv (diff)
parentDon't build handlers on workers unnecessarily (diff)
downloadsynapse-56e709857ce6f48197061dbb5597d90a75877051.tar.xz
Merge pull request #2979 from matrix-org/erikj/no_handlers
Don't build handlers on workers unnecessarily
Diffstat (limited to 'synapse/federation/federation_server.py')
-rw-r--r--synapse/federation/federation_server.py10
1 files changed, 1 insertions, 9 deletions
diff --git a/synapse/federation/federation_server.py b/synapse/federation/federation_server.py
index f6fd2e86e9..bea7fd0b71 100644
--- a/synapse/federation/federation_server.py
+++ b/synapse/federation/federation_server.py
@@ -54,27 +54,19 @@ class FederationServer(FederationBase):
         super(FederationServer, self).__init__(hs)
 
         self.auth = hs.get_auth()
+        self.handler = hs.get_handlers().federation_handler
 
         self._server_linearizer = async.Linearizer("fed_server")
         self._transaction_linearizer = async.Linearizer("fed_txn_handler")
 
         self.transaction_actions = TransactionActions(self.store)
 
-        self.handler = None
-
         self.registry = hs.get_federation_registry()
 
         # We cache responses to state queries, as they take a while and often
         # come in waves.
         self._state_resp_cache = ResponseCache(hs, timeout_ms=30000)
 
-    def set_handler(self, handler):
-        """Sets the handler that the replication layer will use to communicate
-        receipt of new PDUs from other home servers. The required methods are
-        documented on :py:class:`.ReplicationHandler`.
-        """
-        self.handler = handler
-
     @defer.inlineCallbacks
     @log_function
     def on_backfill_request(self, origin, room_id, versions, limit):