Commit 9ba9d78a authored by antirez's avatar antirez
Browse files

Log when a slave lose the connection with its master.

parent d33f3689
......@@ -637,9 +637,9 @@ void freeClient(redisClient *c) {
*
* Note that before doing this we make sure that the client is not in
* some unexpected state, by checking its flags. */
if (server.master &&
(c->flags & REDIS_MASTER) &&
!(c->flags & (REDIS_CLOSE_AFTER_REPLY|
if (server.master && c->flags & REDIS_MASTER) {
redisLog(REDIS_WARNING,"Connection with master lost.");
if (!(c->flags & (REDIS_CLOSE_AFTER_REPLY|
REDIS_CLOSE_ASAP|
REDIS_BLOCKED|
REDIS_UNBLOCKED)))
......@@ -647,6 +647,7 @@ void freeClient(redisClient *c) {
replicationCacheMaster(c);
return;
}
}
/* Free the query buffer */
sdsfree(c->querybuf);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment