diff --git a/src/redis.h b/src/redis.h index 9a9b511c..e79855d8 100644 --- a/src/redis.h +++ b/src/redis.h @@ -670,7 +670,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 45a223b8..3f7c2914 100644 --- a/src/replication.c +++ b/src/replication.c @@ -668,7 +668,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;