summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSalvatore Sanfilippo <antirez@gmail.com>2012-09-05 06:59:37 -0700
committerSalvatore Sanfilippo <antirez@gmail.com>2012-09-05 06:59:37 -0700
commit24bc807b5c781ba0f8d0582d47bde237d6748a5d (patch)
treea8dc3487ce64f3a74f1ffa0457e1e3e99c727974
parent36741b2c818a95e8ef167818271614ee6b1bc414 (diff)
parent9edfe63553314fc2258392db94bfce8a4144b303 (diff)
downloadredis-24bc807b5c781ba0f8d0582d47bde237d6748a5d.tar.gz
Merge pull request #576 from saj/fix-slave-ping-period
Bug fix: slaves being pinged every second
-rw-r--r--src/redis.h2
-rw-r--r--src/replication.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/redis.h b/src/redis.h
index 5e4ee844c..ec2bde221 100644
--- a/src/redis.h
+++ b/src/redis.h
@@ -679,7 +679,7 @@ struct redisServer {
char *masterauth; /* AUTH with this password with master */
char *masterhost; /* Hostname of master */
int masterport; /* Port of master */
- int repl_ping_slave_period; /* Master pings the salve every N seconds */
+ int repl_ping_slave_period; /* Master pings the slave every N seconds */
int repl_timeout; /* Timeout after N seconds of master idle */
redisClient *master; /* Client that is master for this slave */
int repl_syncio_timeout; /* Timeout for synchronous I/O calls */
diff --git a/src/replication.c b/src/replication.c
index 72b88977a..b43e9927f 100644
--- a/src/replication.c
+++ b/src/replication.c
@@ -744,7 +744,7 @@ void replicationCron(void) {
* So slaves can implement an explicit timeout to masters, and will
* be able to detect a link disconnection even if the TCP connection
* will not actually go down. */
- if (!(server.cronloops % (server.repl_ping_slave_period*10))) {
+ if (!(server.cronloops % (server.repl_ping_slave_period * REDIS_HZ))) {
listIter li;
listNode *ln;