dictEntry *de;
list *l;
+ printf("blockForKey %p %s\n", c, key->ptr);
c->blockingkey = key;
incrRefCount(key);
c->blockingto = timeout;
int retval;
l = listCreate();
- retval = dictAdd(c->db->blockingkeys,c,l);
+ retval = dictAdd(c->db->blockingkeys,key,l);
+ incrRefCount(key);
assert(retval == DICT_OK);
} else {
l = dictGetEntryVal(de);
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);