Merge pull request #532 from amallia/assert-side-effects
Assert statement calls a function which has side effects
This commit is contained in:
commit
4d8f3fb207
3
async.c
3
async.c
@ -336,7 +336,8 @@ static void __redisAsyncDisconnect(redisAsyncContext *ac) {
|
|||||||
|
|
||||||
if (ac->err == 0) {
|
if (ac->err == 0) {
|
||||||
/* For clean disconnects, there should be no pending callbacks. */
|
/* 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 {
|
} else {
|
||||||
/* Disconnection is caused by an error, make sure that pending
|
/* Disconnection is caused by an error, make sure that pending
|
||||||
* callbacks cannot call new commands. */
|
* callbacks cannot call new commands. */
|
||||||
|
Loading…
Reference in New Issue
Block a user