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
4846c0c8
Commit
4846c0c8
authored
Jun 02, 2020
by
zhaozhao.zz
Committed by
antirez
Jun 09, 2020
Browse files
donot free protected client in freeClientsInAsyncFreeQueue
related #7234
parent
f33de403
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/networking.c
View file @
4846c0c8
...
@@ -1239,14 +1239,20 @@ void freeClientAsync(client *c) {
...
@@ -1239,14 +1239,20 @@ void freeClientAsync(client *c) {
/* Free the clietns marked as CLOSE_ASAP, return the number of clients
/* Free the clietns marked as CLOSE_ASAP, return the number of clients
* freed. */
* freed. */
int
freeClientsInAsyncFreeQueue
(
void
)
{
int
freeClientsInAsyncFreeQueue
(
void
)
{
int
freed
=
listLength
(
server
.
clients_to_close
);
int
freed
=
0
;
while
(
listLength
(
server
.
clients_to_close
))
{
listIter
li
;
listNode
*
ln
=
listFirst
(
server
.
clients_to_close
);
listNode
*
ln
;
listRewind
(
server
.
clients_to_close
,
&
li
);
while
((
ln
=
listNext
(
&
li
))
!=
NULL
)
{
client
*
c
=
listNodeValue
(
ln
);
client
*
c
=
listNodeValue
(
ln
);
if
(
c
->
flags
&
CLIENT_PROTECTED
)
continue
;
c
->
flags
&=
~
CLIENT_CLOSE_ASAP
;
c
->
flags
&=
~
CLIENT_CLOSE_ASAP
;
freeClient
(
c
);
freeClient
(
c
);
listDelNode
(
server
.
clients_to_close
,
ln
);
listDelNode
(
server
.
clients_to_close
,
ln
);
freed
++
;
}
}
return
freed
;
return
freed
;
}
}
...
...
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