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
c54de703
Commit
c54de703
authored
May 20, 2015
by
antirez
Browse files
Sentinel: fix sentinelTryConnectionSharing() by checking for no match
Trivial omission of the obvious no-match case.
parent
164b6bba
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/sentinel.c
View file @
c54de703
...
@@ -1023,6 +1023,7 @@ int sentinelTryConnectionSharing(sentinelRedisInstance *ri) {
...
@@ -1023,6 +1023,7 @@ int sentinelTryConnectionSharing(sentinelRedisInstance *ri) {
if
(
master
==
ri
->
master
)
continue
;
if
(
master
==
ri
->
master
)
continue
;
match
=
getSentinelRedisInstanceByAddrAndRunID
(
master
->
sentinels
,
match
=
getSentinelRedisInstanceByAddrAndRunID
(
master
->
sentinels
,
NULL
,
0
,
ri
->
runid
);
NULL
,
0
,
ri
->
runid
);
if
(
match
==
NULL
)
continue
;
/* No match. */
if
(
match
==
ri
)
continue
;
/* Should never happen but... safer. */
if
(
match
==
ri
)
continue
;
/* Should never happen but... safer. */
/* We identified a matching Sentinel, great! Let's free our link
/* We identified a matching Sentinel, great! Let's free our link
...
...
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