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
c0d72293
Commit
c0d72293
authored
Nov 14, 2013
by
antirez
Browse files
Sentinel: fix conditional to only affect slaves with wrong master.
parent
dfbd9c5a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/sentinel.c
View file @
c0d72293
...
@@ -1626,6 +1626,7 @@ void sentinelRefreshInstanceInfo(sentinelRedisInstance *ri, const char *info) {
...
@@ -1626,6 +1626,7 @@ void sentinelRefreshInstanceInfo(sentinelRedisInstance *ri, const char *info) {
/* Handle slaves replicating to a different master address. */
/* Handle slaves replicating to a different master address. */
if
((
ri
->
flags
&
SRI_SLAVE
)
&&
!
sentinel
.
tilt
&&
if
((
ri
->
flags
&
SRI_SLAVE
)
&&
!
sentinel
.
tilt
&&
role
==
SRI_SLAVE
&&
(
ri
->
slave_master_port
!=
ri
->
master
->
addr
->
port
||
(
ri
->
slave_master_port
!=
ri
->
master
->
addr
->
port
||
strcasecmp
(
ri
->
slave_master_host
,
ri
->
master
->
addr
->
ip
)))
strcasecmp
(
ri
->
slave_master_host
,
ri
->
master
->
addr
->
ip
)))
{
{
...
...
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