ln = listSearchKey(server.clients,c);
redisAssert(ln != NULL);
listDelNode(server.clients,ln);
+ /* When client was just unblocked because of a blocking operation,
+ * remove it from the list with unblocked clients. */
+ if (c->flags & REDIS_UNBLOCKED) {
+ ln = listSearchKey(server.unblocked_clients,c);
+ redisAssert(ln != NULL);
+ listDelNode(server.unblocked_clients,ln);
+ }
/* Remove from the list of clients waiting for swapped keys, or ready
* to be restarted, but not yet woken up again. */
if (c->flags & REDIS_IO_WAIT) {
/* Case 2: we lost the connection with the master. */
if (c->flags & REDIS_MASTER) {
server.master = NULL;
- /* FIXME */
server.replstate = REDIS_REPL_CONNECT;
/* Since we lost the connection with the master, we should also
* close the connection with all our slaves if we have any, so