Skip to content

Conversation

@MikeJiang96
Copy link

In hiredis_readme:

Flag Description
REDIS_OPT_NOAUTOFREE ASYNC: Tells hiredis not to automatically free the redisAsyncContext on connection/communication failure, but only if the user makes an explicit call to redisAsyncDisconnect or redisAsyncFree

redisAsyncDisconnect() will do clean up stuff no matter connection is OK or failure

So we set context_ to NULL after calling disconnectCb_() to fix, then redisAsyncFree() in dtor is fine

redisAsyncDisconnect() will free resource, should not free again
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant