mirror of
https://github.com/fluencelabs/redis
synced 2025-06-12 16:51:22 +00:00
Added a function to get slave name for logs.
This commit is contained in:
@ -678,12 +678,8 @@ void freeClient(redisClient *c) {
|
||||
|
||||
/* Log link disconnection with slave */
|
||||
if ((c->flags & REDIS_SLAVE) && !(c->flags & REDIS_MONITOR)) {
|
||||
char ip[REDIS_IP_STR_LEN];
|
||||
|
||||
if (anetPeerToString(c->fd,ip,sizeof(ip),NULL) != -1) {
|
||||
redisLog(REDIS_WARNING,"Connection with slave %s:%d lost.",
|
||||
ip, c->slave_listening_port);
|
||||
}
|
||||
redisLog(REDIS_WARNING,"Connection with slave %s lost.",
|
||||
replicationGetSlaveName(c));
|
||||
}
|
||||
|
||||
/* Free the query buffer */
|
||||
|
Reference in New Issue
Block a user