mirror of
https://github.com/fluencelabs/redis
synced 2025-03-17 16:10:50 +00:00
Slave disconnection is an event worth logging.
This commit is contained in:
parent
66ec1412fe
commit
ba5eb44d14
@ -666,6 +666,16 @@ void freeClient(redisClient *c) {
|
||||
}
|
||||
}
|
||||
|
||||
/* Log link disconnection with slave */
|
||||
if (c->flags & REDIS_SLAVE) {
|
||||
char ip[REDIS_IP_STR_LEN];
|
||||
|
||||
if (anetPeerToString(c->fd,ip,sizeof(ip),NULL) == -1)
|
||||
strncpy(ip,"?",REDIS_IP_STR_LEN);
|
||||
redisLog(REDIS_WARNING,"Connection with slave %s:%d lost.",
|
||||
ip, c->slave_listening_port);
|
||||
}
|
||||
|
||||
/* Free the query buffer */
|
||||
sdsfree(c->querybuf);
|
||||
c->querybuf = NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user