Skip to content

Commit

Permalink
Unsubscribe messages always have 3 elements
Browse files Browse the repository at this point in the history
  • Loading branch information
pietern committed Dec 31, 2010
1 parent ed97945 commit ec922cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions async.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit ec922cd

Please sign in to comment.