Net: clientsArePaused() should not touch blocked clients.

When the list of unblocked clients were processed, btype was set to
blocking type none, but the client remained flagged with REDIS_BLOCKED.
When timeout is reached (or when the client disconnects), unblocking it
will trigger an assertion.

There is no need to process pending requests from blocked clients, so
now clientsArePaused() just avoid touching blocked clients.

Close #2467.
This commit is contained in:
antirez 2015-03-21 09:03:46 +01:00
parent 8dac5c8bb3
commit 2d7d75adb3

View File

@ -1702,7 +1702,7 @@ int clientsArePaused(void) {
while ((ln = listNext(&li)) != NULL) { while ((ln = listNext(&li)) != NULL) {
c = listNodeValue(ln); c = listNodeValue(ln);
if (c->flags & REDIS_SLAVE) continue; if (c->flags & (REDIS_SLAVE|REDIS_BLOCKED)) continue;
listAddNodeTail(server.unblocked_clients,c); listAddNodeTail(server.unblocked_clients,c);
} }
} }