You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
my question is redisClusterAsyncContext have redisClusterAsyncSetDisconnectCallback process dissconnect event, but redisClusterContext not have correspond method, does it means when i use redisClusterContext, it automatic processing dissconnect?
The text was updated successfully, but these errors were encountered:
When a command is sent hiredis-cluster will first check if there is a working connection to the redis node that handles the specific key. If a previous query failed due to communication issues a reconnection attempt is performed automatically.
For the async API the callback is only used to notify the user about a disconnect, so there is no need to call a connect method here either.
Another note about your example is to make sure that redisClusterConnect2(ctx); results in REDIS_OK.
i use hiredis cluster like this
ctx = redisClusterContextInit();
redisClusterSetOptionAddNodes(ctx, redis_url.c_str());
if (!password.empty()) {
redisClusterSetOptionPassword(ctx, password.c_str());
}
redisClusterSetOptionRouteUseSlots(ctx);
redisClusterConnect2(ctx);`
my question is redisClusterAsyncContext have redisClusterAsyncSetDisconnectCallback process dissconnect event, but redisClusterContext not have correspond method, does it means when i use redisClusterContext, it automatic processing dissconnect?
The text was updated successfully, but these errors were encountered: