Unblocked clients API refactoring. See #4418.

This commit is contained in:
antirez
2018-09-03 18:39:18 +02:00
parent 2b689ad641
commit 6c001bfc0d
4 changed files with 33 additions and 15 deletions

View File

@ -2134,11 +2134,10 @@ int clientsArePaused(void) {
while ((ln = listNext(&li)) != NULL) {
c = listNodeValue(ln);
/* 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);
/* Don't touch slaves and blocked clients.
* The latter pending requests will be processed when unblocked. */
if (c->flags & (CLIENT_SLAVE|CLIENT_BLOCKED)) continue;
queueClientForReprocessing(c);
}
}
return server.clients_paused;