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
2b689ad6
Unverified
Commit
2b689ad6
authored
Sep 03, 2018
by
Salvatore Sanfilippo
Committed by
GitHub
Sep 03, 2018
Browse files
Merge pull request #4418 from soloestoy/fix-multiple-unblock
fix multiple unblock for clientsArePaused()
parents
3e7349fd
2290c4be
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/networking.c
View file @
2b689ad6
...
@@ -2134,9 +2134,9 @@ int clientsArePaused(void) {
...
@@ -2134,9 +2134,9 @@ int clientsArePaused(void) {
while
((
ln
=
listNext
(
&
li
))
!=
NULL
)
{
while
((
ln
=
listNext
(
&
li
))
!=
NULL
)
{
c
=
listNodeValue
(
ln
);
c
=
listNodeValue
(
ln
);
/* Don't touch slaves and blocked
clients. The latter pending
/* Don't touch slaves and blocked
or unblocked clients.
* requests be processed when unblocked. */
*
The latter pending
requests be processed when unblocked. */
if
(
c
->
flags
&
(
CLIENT_SLAVE
|
CLIENT_BLOCKED
))
continue
;
if
(
c
->
flags
&
(
CLIENT_SLAVE
|
CLIENT_BLOCKED
|
CLIENT_UNBLOCKED
))
continue
;
c
->
flags
|=
CLIENT_UNBLOCKED
;
c
->
flags
|=
CLIENT_UNBLOCKED
;
listAddNodeTail
(
server
.
unblocked_clients
,
c
);
listAddNodeTail
(
server
.
unblocked_clients
,
c
);
}
}
...
...
src/scripting.c
View file @
2b689ad6
...
@@ -1367,7 +1367,7 @@ void evalGenericCommand(client *c, int evalsha) {
...
@@ -1367,7 +1367,7 @@ void evalGenericCommand(client *c, int evalsha) {
* script timeout was detected. */
* script timeout was detected. */
aeCreateFileEvent
(
server
.
el
,
c
->
fd
,
AE_READABLE
,
aeCreateFileEvent
(
server
.
el
,
c
->
fd
,
AE_READABLE
,
readQueryFromClient
,
c
);
readQueryFromClient
,
c
);
if
(
server
.
masterhost
&&
server
.
master
)
{
if
(
server
.
masterhost
&&
server
.
master
&&
!
(
server
.
master
->
flags
&
CLIENT_UNBLOCKED
)
)
{
server
.
master
->
flags
|=
CLIENT_UNBLOCKED
;
server
.
master
->
flags
|=
CLIENT_UNBLOCKED
;
listAddNodeTail
(
server
.
unblocked_clients
,
server
.
master
);
listAddNodeTail
(
server
.
unblocked_clients
,
server
.
master
);
}
}
...
...
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