Open yyhclimacool opened 4 years ago
Also happen to me: Doesn't timeout properly when server is unreachable. when you will fix it ?
Also happen to me: Doesn't timeout properly when server is unreachable. when you will fix it ?
Also happen to me: Doesn't timeout properly when server is unreachable. when you will fix it ?
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 calledstruct 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...
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 calledstruct 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...