Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
24bc807b
Commit
24bc807b
authored
Sep 05, 2012
by
Salvatore Sanfilippo
Browse files
Merge pull request #576 from saj/fix-slave-ping-period
Bug fix: slaves being pinged every second
parents
36741b2c
9edfe635
Changes
2
Show whitespace changes
Inline
Side-by-side
src/redis.h
View file @
24bc807b
...
@@ -679,7 +679,7 @@ struct redisServer {
...
@@ -679,7 +679,7 @@ struct redisServer {
char
*
masterauth
;
/* AUTH with this password with master */
char
*
masterauth
;
/* AUTH with this password with master */
char
*
masterhost
;
/* Hostname of master */
char
*
masterhost
;
/* Hostname of master */
int
masterport
;
/* Port of master */
int
masterport
;
/* Port of master */
int
repl_ping_slave_period
;
/* Master pings the s
a
lve every N seconds */
int
repl_ping_slave_period
;
/* Master pings the sl
a
ve every N seconds */
int
repl_timeout
;
/* Timeout after N seconds of master idle */
int
repl_timeout
;
/* Timeout after N seconds of master idle */
redisClient
*
master
;
/* Client that is master for this slave */
redisClient
*
master
;
/* Client that is master for this slave */
int
repl_syncio_timeout
;
/* Timeout for synchronous I/O calls */
int
repl_syncio_timeout
;
/* Timeout for synchronous I/O calls */
...
...
src/replication.c
View file @
24bc807b
...
@@ -744,7 +744,7 @@ void replicationCron(void) {
...
@@ -744,7 +744,7 @@ void replicationCron(void) {
* So slaves can implement an explicit timeout to masters, and will
* So slaves can implement an explicit timeout to masters, and will
* be able to detect a link disconnection even if the TCP connection
* be able to detect a link disconnection even if the TCP connection
* will not actually go down. */
* 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
;
listIter
li
;
listNode
*
ln
;
listNode
*
ln
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment