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

Log when a slave lose the connection with its master.

parent d33f3689
...@@ -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 */
......
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