summary refs log tree commit diff
path: root/synapse/replication/tcp/resource.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-04-04 13:19:26 +0100
committerErik Johnston <erik@matrix.org>2017-04-04 13:19:26 +0100
commit023ee197be23c02fa5f2e5bffba23fb0da2bf35b (patch)
treec0abea570b1eb5f83e01d43d61c9b46b7b9957c4 /synapse/replication/tcp/resource.py
parentMerge pull request #2082 from matrix-org/erikj/repl_tcp_server (diff)
downloadsynapse-023ee197be23c02fa5f2e5bffba23fb0da2bf35b.tar.xz
Advance replication streams even if nothing is listening
Otherwise the streams don't advance and steadily fall behind, so when a
worker does connect either a) they'll be streamed lots of old updates or
b) the connection will fail as the streams are too far behind.
Diffstat (limited to 'synapse/replication/tcp/resource.py')
-rw-r--r--synapse/replication/tcp/resource.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/replication/tcp/resource.py b/synapse/replication/tcp/resource.py
index 0d7ea57318..8b2c4c3043 100644
--- a/synapse/replication/tcp/resource.py
+++ b/synapse/replication/tcp/resource.py
@@ -124,7 +124,7 @@ class ReplicationStreamer(object):
             # Don't bother if nothing is listening. We still need to advance
             # the stream tokens otherwise they'll fall beihind forever
             for stream in self.streams:
-                stream.advance_current_token()
+                stream.discard_updates_and_advance()
             return
 
         # If we're in the process of checking for new updates, mark that fact