Assert statement calls a function which has side effects

This commit is contained in:
amallia 2017-06-15 20:33:23 +01:00
parent 97cd8157f7
commit b46413647f
1 changed files with 2 additions and 1 deletions

View File

@ -336,7 +336,8 @@ static void __redisAsyncDisconnect(redisAsyncContext *ac) {
if (ac->err == 0) {
/* For clean disconnects, there should be no pending callbacks. */
assert(__redisShiftCallback(&ac->replies,NULL) == REDIS_ERR);
int ret = __redisShiftCallback(&ac->replies,NULL);
assert(ret == REDIS_ERR);
} else {
/* Disconnection is caused by an error, make sure that pending
* callbacks cannot call new commands. */