Unsubscribe messages always have 3 elements
This commit is contained in:
parent
ed97945c27
commit
ec922cd007
4
async.c
4
async.c
@ -330,8 +330,8 @@ static int __redisGetSubscribeCallback(redisAsyncContext *ac, redisReply *reply,
|
|||||||
|
|
||||||
/* If this was the last unsubscribe message, revert to
|
/* If this was the last unsubscribe message, revert to
|
||||||
* non-subscribe mode. */
|
* non-subscribe mode. */
|
||||||
assert(reply->element[2+pvariant]->type == REDIS_REPLY_INTEGER);
|
assert(reply->element[2]->type == REDIS_REPLY_INTEGER);
|
||||||
if (reply->element[2+pvariant]->integer == 0)
|
if (reply->element[2]->integer == 0)
|
||||||
c->flags &= ~REDIS_SUBSCRIBED;
|
c->flags &= ~REDIS_SUBSCRIBED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user