Move to struct.

This commit is contained in:
Damian Janowski & Michel Martens
2010-11-08 19:38:01 -03:00
committed by Michel Martens
parent b2a7fd0cf7
commit 357a841714
3 changed files with 34 additions and 27 deletions

View File

@ -41,8 +41,10 @@ redisClient *createClient(int fd) {
c->reply = listCreate();
listSetFreeMethod(c->reply,decrRefCount);
listSetDupMethod(c->reply,dupClientReplyValue);
c->blocking_keys = NULL;
c->blocking_keys_num = 0;
c->bstate.keys = NULL;
c->bstate.count = 0;
c->bstate.timeout = 0;
c->bstate.target = NULL;
c->io_keys = listCreate();
c->watched_keys = listCreate();
listSetFreeMethod(c->io_keys,decrRefCount);
@ -677,7 +679,7 @@ void closeTimedoutClients(void) {
redisLog(REDIS_VERBOSE,"Closing idle client");
freeClient(c);
} else if (c->flags & REDIS_BLOCKED) {
if (c->blockingto != 0 && c->blockingto < now) {
if (c->bstate.timeout != 0 && c->bstate.timeout < now) {
addReply(c,shared.nullmultibulk);
unblockClientWaitingData(c);
}