Commit de73d241 authored by michael-grunder's avatar michael-grunder
Browse files

Still invoke onDisconnect and dataCleanup even when NO_AUTOFREE is set.

See #712
parent d756f68a
...@@ -444,6 +444,13 @@ void __redisAsyncDisconnect(redisAsyncContext *ac) { ...@@ -444,6 +444,13 @@ void __redisAsyncDisconnect(redisAsyncContext *ac) {
* callbacks with a NULL-reply. */ * callbacks with a NULL-reply. */
if (!(c->flags & REDIS_NO_AUTO_FREE)) { if (!(c->flags & REDIS_NO_AUTO_FREE)) {
__redisAsyncFree(ac); __redisAsyncFree(ac);
} else {
if (c->flags & REDIS_CONNECTED) {
__redisRunDisconnectCallback(ac, ac->err == 0 ? REDIS_OK : REDIS_ERR);
}
if (ac->dataCleanup) {
ac->dataCleanup(ac->data);
}
} }
} }
......
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