summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2013-03-13 12:51:10 +0100
committerantirez <antirez@gmail.com>2013-03-13 12:55:06 +0100
commit4f8b18f3dd8a4a7feaa8b8d4c41d894b75f73405 (patch)
tree5bfa5a005a2550f4d078db852286f471516488ab
parentc64255990e9d1defed1c5f9c63cd447388049917 (diff)
downloadredis-4f8b18f3dd8a4a7feaa8b8d4c41d894b75f73405.tar.gz
Replication: master_link_down_since_seconds initial value should be huge.
server.repl_down_since used to be initialized to the current time at startup. This is wrong since the replication never started. Clients testing this filed to check if data is uptodate should never believe data is recent if we never ever connected to our master.
-rw-r--r--src/redis.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/redis.c b/src/redis.c
index 338aa251e..54d5165a6 100644
--- a/src/redis.c
+++ b/src/redis.c
@@ -1222,7 +1222,7 @@ void initServerConfig() {
server.repl_syncio_timeout = REDIS_REPL_SYNCIO_TIMEOUT;
server.repl_serve_stale_data = 1;
server.repl_slave_ro = 1;
- server.repl_down_since = time(NULL);
+ server.repl_down_since = 0; /* Never connected, repl is down since EVER. */
server.repl_disable_tcp_nodelay = 0;
server.slave_priority = REDIS_DEFAULT_SLAVE_PRIORITY;