mirror of
https://github.com/fluencelabs/redis
synced 2025-05-02 14:02:14 +00:00
Log disconnection with slave only when ip:port is available.
This commit is contained in:
parent
27d06111db
commit
0a1a236e3e
@ -653,10 +653,10 @@ void freeClient(redisClient *c) {
|
|||||||
if (c->flags & REDIS_SLAVE) {
|
if (c->flags & REDIS_SLAVE) {
|
||||||
char ip[REDIS_IP_STR_LEN];
|
char ip[REDIS_IP_STR_LEN];
|
||||||
|
|
||||||
if (anetPeerToString(c->fd,ip,sizeof(ip),NULL) == -1)
|
if (anetPeerToString(c->fd,ip,sizeof(ip),NULL) != -1) {
|
||||||
strncpy(ip,"?",REDIS_IP_STR_LEN);
|
redisLog(REDIS_WARNING,"Connection with slave %s:%d lost.",
|
||||||
redisLog(REDIS_WARNING,"Connection with slave %s:%d lost.",
|
ip, c->slave_listening_port);
|
||||||
ip, c->slave_listening_port);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Free the query buffer */
|
/* Free the query buffer */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user