diff options
author | Jeroen <vo.jeroen@gmail.com> | 2018-07-09 08:51:11 +0200 |
---|---|---|
committer | Jeroen <vo.jeroen@gmail.com> | 2018-07-09 08:51:11 +0200 |
commit | b5e157d895dcf182d7ffc58edf6442deeaebc3f0 (patch) | |
tree | a3f8a4549d0fe4947bef34632218b41c94202b19 /synapse/replication/tcp/client.py | |
parent | take idna implementation from twisted (diff) | |
parent | Add an isort configuration (#3463) (diff) | |
download | synapse-b5e157d895dcf182d7ffc58edf6442deeaebc3f0.tar.xz |
Merge branch 'develop' into send_sni_for_federation_requests
# Conflicts: # synapse/http/endpoint.py
Diffstat (limited to 'synapse/replication/tcp/client.py')
-rw-r--r-- | synapse/replication/tcp/client.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/replication/tcp/client.py b/synapse/replication/tcp/client.py index 6d2513c4e2..bb852b00af 100644 --- a/synapse/replication/tcp/client.py +++ b/synapse/replication/tcp/client.py @@ -15,7 +15,7 @@ """A replication client for use by synapse workers. """ -from twisted.internet import reactor, defer +from twisted.internet import defer from twisted.internet.protocol import ReconnectingClientFactory from .commands import ( @@ -44,7 +44,7 @@ class ReplicationClientFactory(ReconnectingClientFactory): self.server_name = hs.config.server_name self._clock = hs.get_clock() # As self.clock is defined in super class - reactor.addSystemEventTrigger("before", "shutdown", self.stopTrying) + hs.get_reactor().addSystemEventTrigger("before", "shutdown", self.stopTrying) def startedConnecting(self, connector): logger.info("Connecting to replication: %r", connector.getDestination()) @@ -95,7 +95,7 @@ class ReplicationClientHandler(object): factory = ReplicationClientFactory(hs, client_name, self) host = hs.config.worker_replication_host port = hs.config.worker_replication_port - reactor.connectTCP(host, port, factory) + hs.get_reactor().connectTCP(host, port, factory) def on_rdata(self, stream_name, token, rows): """Called when we get new replication data. By default this just pokes |