Skip to content

Commit

Permalink
Merge pull request redis#576 from saj/fix-slave-ping-period
Browse files Browse the repository at this point in the history
Bug fix: slaves being pinged every second
  • Loading branch information
antirez committed Sep 5, 2012
2 parents 36741b2 + 9edfe63 commit 24bc807
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/redis.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion src/replication.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 24bc807

Please sign in to comment.