-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to set timeout on a redis cluster client #128
Comments
Also happen to me: |
1 similar comment
Also happen to me: |
how do you solve this pro? |
how do you solve this pro? |
hiredis-vip : master
date : 2019-11-25
hiredis version in hircluster.h : 1.0.0
In my code, I got a
redisClusterContext
,I called
struct timeval tv = { _timeout_ms / 1000, (_timeout_ms % 1000) * 1000};
_context = redisClusterConnectWithTimeout(_host.c_str(), tv, HIRCLUSTER_FLAG_NULL);
if (redisClusterSetOptionTimeout(_context,tv) != REDIS_OK) { /* log on error */ }
Why it won't work, if I set _timeout_ms=10 , my redis command timer still get a number bigger than 10, say 29 maybe...
The text was updated successfully, but these errors were encountered: