Still invoke onDisconnect and dataCleanup even when NO_AUTOFREE is set.
See #712
This commit is contained in:
parent
d756f68a59
commit
de73d24131
7
async.c
7
async.c
@ -444,6 +444,13 @@ void __redisAsyncDisconnect(redisAsyncContext *ac) {
|
||||
* callbacks with a NULL-reply. */
|
||||
if (!(c->flags & REDIS_NO_AUTO_FREE)) {
|
||||
__redisAsyncFree(ac);
|
||||
} else {
|
||||
if (c->flags & REDIS_CONNECTED) {
|
||||
__redisRunDisconnectCallback(ac, ac->err == 0 ? REDIS_OK : REDIS_ERR);
|
||||
}
|
||||
if (ac->dataCleanup) {
|
||||
ac->dataCleanup(ac->data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user