diff options
author | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2010-12-31 14:40:39 +0100 |
---|---|---|
committer | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2010-12-31 15:49:26 +0100 |
commit | ec922cd0075eee0628ee28857541900a496ea9e1 (patch) | |
tree | bf5bd03d9acd6134252ba9c2200356fd2ae2b799 | |
parent | ed97945c27042bcec83792dfd855a3eed1a59011 (diff) |
Unsubscribe messages always have 3 elements
-rw-r--r-- | async.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -330,8 +330,8 @@ static int __redisGetSubscribeCallback(redisAsyncContext *ac, redisReply *reply, /* If this was the last unsubscribe message, revert to * non-subscribe mode. */ - assert(reply->element[2+pvariant]->type == REDIS_REPLY_INTEGER); - if (reply->element[2+pvariant]->integer == 0) + assert(reply->element[2]->type == REDIS_REPLY_INTEGER); + if (reply->element[2]->integer == 0) c->flags &= ~REDIS_SUBSCRIBED; } } |