mirror of
http://github.com/valkey-io/valkey
synced 2024-11-22 18:54:58 +00:00
Merge pull request #576 from saj/fix-slave-ping-period
Bug fix: slaves being pinged every second
This commit is contained in:
commit
24bc807b5c
@ -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 */
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user