X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/7a1fd61e3d3d7572ff7825f337206c19c992a83b..e53ca04b50b86ef158a75c54ae9ee8b17e31719c:/src/networking.c diff --git a/src/networking.c b/src/networking.c index 55daff85..166b44c9 100644 --- a/src/networking.c +++ b/src/networking.c @@ -456,6 +456,13 @@ void freeClient(redisClient *c) { 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) { @@ -490,7 +497,6 @@ void freeClient(redisClient *c) { /* 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