Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
0a1a236e
Commit
0a1a236e
authored
Dec 25, 2013
by
antirez
Browse files
Log disconnection with slave only when ip:port is available.
parent
27d06111
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/networking.c
View file @
0a1a236e
...
...
@@ -653,10 +653,10 @@ void freeClient(redisClient *c) {
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
);
if (anetPeerToString(c->fd,ip,sizeof(ip),NULL)
!
= -1)
{
redisLog(REDIS_WARNING,"Connection with slave %s:%d lost.",
ip, c->slave_listening_port);
}
}
/* Free the query buffer */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment