summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPieter Noordhuis <pcnoordhuis@gmail.com>2010-12-31 14:40:39 +0100
committerPieter Noordhuis <pcnoordhuis@gmail.com>2010-12-31 15:49:26 +0100
commitec922cd0075eee0628ee28857541900a496ea9e1 (patch)
treebf5bd03d9acd6134252ba9c2200356fd2ae2b799
parented97945c27042bcec83792dfd855a3eed1a59011 (diff)
Unsubscribe messages always have 3 elements
-rw-r--r--async.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/async.c b/async.c
index d89a2a0..8343df4 100644
--- a/async.c
+++ b/async.c
@@ -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;
}
}