From: antirez Date: Tue, 29 Dec 2009 20:50:08 +0000 (-0500) Subject: a few more fixes, still broken X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/9fe33a0e1245a0c74628894a3a174786bf23a323?ds=inline a few more fixes, still broken --- diff --git a/redis.c b/redis.c index 71f1594f..43a86ca9 100644 --- a/redis.c +++ b/redis.c @@ -5479,6 +5479,7 @@ static void blockForKey(redisClient *c, robj *key, time_t timeout) { dictEntry *de; list *l; + printf("blockForKey %p %s\n", c, key->ptr); c->blockingkey = key; incrRefCount(key); c->blockingto = timeout; @@ -5488,6 +5489,7 @@ static void blockForKey(redisClient *c, robj *key, time_t timeout) { l = listCreate(); retval = dictAdd(c->db->blockingkeys,key,l); + incrRefCount(key); assert(retval == DICT_OK); } else { l = dictGetEntryVal(de); @@ -5502,6 +5504,7 @@ static void unblockClient(redisClient *c) { dictEntry *de; list *l; + printf("unblockClient %p %s\n", c, c->blockingkey->ptr); /* Remove this client from the list of clients waiting for this key. */ assert(c->blockingkey != NULL); de = dictFind(c->db->blockingkeys,c->blockingkey);