Commit c882a362 authored by Pieter Noordhuis's avatar Pieter Noordhuis
Browse files

Only check REDIS_FREEING when a callback was executed

parent e3776bfa
......@@ -246,15 +246,15 @@ void redisProcessCallbacks(redisAsyncContext *ac) {
assert(__redisShiftCallback(&ac->replies,&cb) == REDIS_OK);
if (cb.fn != NULL) {
cb.fn(ac,reply,cb.privdata);
/* Proceed with free'ing when redisAsyncFree() was called. */
if (c->flags & REDIS_FREEING) {
__redisAsyncFree(ac);
return;
}
} else {
c->fn->freeObject(reply);
}
/* Proceed with free'ing when redisAsyncFree() was called. */
if (c->flags & REDIS_FREEING) {
__redisAsyncFree(ac);
return;
}
}
/* Disconnect when there was an error reading the reply */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment