Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
5fa937d9
Commit
5fa937d9
authored
Dec 22, 2013
by
antirez
Browse files
Slave disconnection is an event worth logging.
parent
9ba9d78a
Changes
1
Show whitespace changes
Inline
Side-by-side
src/networking.c
View file @
5fa937d9
...
...
@@ -649,6 +649,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
;
...
...
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