From 1447d28c0f2659a7a3df769c8426a6ee8a5b4552 Mon Sep 17 00:00:00 2001 From: antirez Date: Wed, 9 Oct 2013 16:36:00 +0200 Subject: [PATCH] Cluster: data_age conversion to milliseconds fixed. --- src/cluster.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cluster.c b/src/cluster.c index aec0176f..26b1f40b 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -1629,9 +1629,9 @@ void clusterHandleSlaveFailover(void) { /* Set data_age to the number of seconds we are disconnected from the master. */ if (server.repl_state == REDIS_REPL_CONNECTED) { - data_age = server.unixtime - server.master->lastinteraction * 1000; + data_age = (server.unixtime - server.master->lastinteraction) * 1000; } else { - data_age = server.unixtime - server.repl_down_since * 1000; + data_age = (server.unixtime - server.repl_down_since) * 1000; } /* Pre conditions to run the function: