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
d275513b
Commit
d275513b
authored
May 01, 2011
by
antirez
Browse files
Merge branch '2.4' of github.com:antirez/redis into 2.4
parents
26184760
c924df8c
Changes
1
Show whitespace changes
Inline
Side-by-side
src/networking.c
View file @
d275513b
...
...
@@ -527,12 +527,18 @@ void freeClient(redisClient *c) {
* close the connection with all our slaves if we have any, so
* when we'll resync with the master the other slaves will sync again
* with us as well. Note that also when the slave is not connected
* to the master it will keep refusing connections by other slaves. */
* to the master it will keep refusing connections by other slaves.
*
* We do this only if server.masterhost != NULL. If it is NULL this
* means the user called SLAVEOF NO ONE and we are freeing our
* link with the master, so no need to close link with slaves. */
if
(
server
.
masterhost
!=
NULL
)
{
while
(
listLength
(
server
.
slaves
))
{
ln
=
listFirst
(
server
.
slaves
);
freeClient
((
redisClient
*
)
ln
->
value
);
}
}
}
/* Release memory */
zfree
(
c
->
argv
);
freeClientMultiState
(
c
);
...
...
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