Commit 2bc1527a authored by antirez's avatar antirez
Browse files

processUnblockedClients: don't process clients that blocekd again

parent f7bd816b
...@@ -117,11 +117,16 @@ void processUnblockedClients(void) { ...@@ -117,11 +117,16 @@ void processUnblockedClients(void) {
listDelNode(server.unblocked_clients,ln); listDelNode(server.unblocked_clients,ln);
c->flags &= ~REDIS_UNBLOCKED; c->flags &= ~REDIS_UNBLOCKED;
/* Process remaining data in the input buffer. */ /* Process remaining data in the input buffer, unless the client
* is blocked again. Actually processInputBuffer() checks that the
* client is not blocked before to proceed, but things may change and
* the code is conceptually more correct this way. */
if (!(c->flags & DISQUE_BLOCKED)) {
if (c->querybuf && sdslen(c->querybuf) > 0) { if (c->querybuf && sdslen(c->querybuf) > 0) {
processInputBuffer(c); processInputBuffer(c);
} }
} }
}
} }
/* Unblock a client calling the right function depending on the kind /* Unblock a client calling the right function depending on the kind
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment