diff options
author | Patrick Cloke <patrickc@matrix.org> | 2022-03-10 14:32:18 -0500 |
---|---|---|
committer | Patrick Cloke <patrickc@matrix.org> | 2022-03-11 10:33:58 -0500 |
commit | e545948eefb9df90f4aaf03ebf75c861ed73cd4d (patch) | |
tree | 1b3e359b701f798bcdac40e885c73cdff84699ad /synapse | |
parent | Update the SSO username picker template to comply with SIWA guidelines (#12210) (diff) | |
download | synapse-e545948eefb9df90f4aaf03ebf75c861ed73cd4d.tar.xz |
Use the reactor from the HomeServer.
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/replication/tcp/redis.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/synapse/replication/tcp/redis.py b/synapse/replication/tcp/redis.py index 989c5be032..b63c151cfb 100644 --- a/synapse/replication/tcp/redis.py +++ b/synapse/replication/tcp/redis.py @@ -256,6 +256,13 @@ class SynapseRedisFactory(txredisapi.RedisFactory): convertNumbers=convertNumbers, ) + # Set the homeserver reactor as the clock, if this is not done than + # twisted.internet.protocol.ReconnectingClientFactory.retry will default + # to the reactor. + self.clock = hs.get_reactor() + + # Send pings every 30 seconds (not that get_clock() returns a Clock, not + # a reactor). hs.get_clock().looping_call(self._send_ping, 30 * 1000) @wrap_as_background_process("redis_ping") |