Merge pull request #4418 from soloestoy/fix-multiple-unblock

fix multiple unblock for clientsArePaused()
This commit is contained in:
Salvatore Sanfilippo 2018-09-03 18:31:02 +02:00 committed by GitHub
commit 2b689ad641
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -2134,9 +2134,9 @@ int clientsArePaused(void) {
while ((ln = listNext(&li)) != NULL) {
c = listNodeValue(ln);
/* Don't touch slaves and blocked clients. The latter pending
* requests be processed when unblocked. */
if (c->flags & (CLIENT_SLAVE|CLIENT_BLOCKED)) continue;
/* Don't touch slaves and blocked or unblocked clients.
* The latter pending requests be processed when unblocked. */
if (c->flags & (CLIENT_SLAVE|CLIENT_BLOCKED|CLIENT_UNBLOCKED)) continue;
c->flags |= CLIENT_UNBLOCKED;
listAddNodeTail(server.unblocked_clients,c);
}

View File

@ -1367,7 +1367,7 @@ void evalGenericCommand(client *c, int evalsha) {
* script timeout was detected. */
aeCreateFileEvent(server.el,c->fd,AE_READABLE,
readQueryFromClient,c);
if (server.masterhost && server.master) {
if (server.masterhost && server.master && !(server.master->flags & CLIENT_UNBLOCKED)) {
server.master->flags |= CLIENT_UNBLOCKED;
listAddNodeTail(server.unblocked_clients,server.master);
}