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
9ba9d78a
Commit
9ba9d78a
authored
Dec 21, 2013
by
antirez
Browse files
Log when a slave lose the connection with its master.
parent
d33f3689
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/networking.c
View file @
9ba9d78a
...
@@ -637,15 +637,16 @@ void freeClient(redisClient *c) {
...
@@ -637,15 +637,16 @@ void freeClient(redisClient *c) {
*
*
* Note that before doing this we make sure that the client is not in
* Note that before doing this we make sure that the client is not in
* some unexpected state, by checking its flags. */
* some unexpected state, by checking its flags. */
if
(
server
.
master
&&
if
(
server
.
master
&&
c
->
flags
&
REDIS_MASTER
)
{
(
c
->
flags
&
REDIS_MASTER
)
&&
redisLog
(
REDIS_WARNING
,
"Connection with master lost."
);
!
(
c
->
flags
&
(
REDIS_CLOSE_AFTER_REPLY
|
if
(
!
(
c
->
flags
&
(
REDIS_CLOSE_AFTER_REPLY
|
REDIS_CLOSE_ASAP
|
REDIS_CLOSE_ASAP
|
REDIS_BLOCKED
|
REDIS_BLOCKED
|
REDIS_UNBLOCKED
)))
REDIS_UNBLOCKED
)))
{
{
replicationCacheMaster
(
c
);
replicationCacheMaster
(
c
);
return
;
return
;
}
}
}
/* Free the query buffer */
/* Free the query buffer */
...
...
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