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
f7bd816b
Commit
f7bd816b
authored
May 05, 2015
by
antirez
Browse files
Don't put clients into unblocked list multiple times
parent
9f9c44fe
Changes
1
Show whitespace changes
Inline
Side-by-side
src/blocked.c
View file @
f7bd816b
...
...
@@ -137,10 +137,14 @@ void unblockClient(redisClient *c) {
/* Clear the flags, and put the client in the unblocked list so that
* we'll process new commands in its query buffer ASAP. */
c
->
flags
&=
~
REDIS_BLOCKED
;
c
->
flags
|=
REDIS_UNBLOCKED
;
c
->
btype
=
REDIS_BLOCKED_NONE
;
server
.
bpop_blocked_clients
--
;
/* The client may already be into the unblocked list because of a previous
* blocking operation, don't add back it into the list multiple times. */
if
(
!
(
c
->
flags
&
REDIS_UNBLOCKED
))
{
c
->
flags
|=
REDIS_UNBLOCKED
;
listAddNodeTail
(
server
.
unblocked_clients
,
c
);
}
}
/* This function gets called when a blocked client timed out in order to
...
...
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