fix: change socket opt
This commit is contained in:
parent
13362841fe
commit
1aee609d36
|
@ -1078,7 +1078,7 @@ int32_t taosCreateSocketWithTimeout(uint32_t timeout) {
|
||||||
// return -1;
|
// return -1;
|
||||||
//}
|
//}
|
||||||
#else // Linux like systems
|
#else // Linux like systems
|
||||||
uint32_t conn_timeout_ms = timeout * 1000;
|
uint32_t conn_timeout_ms = timeout;
|
||||||
if (0 != setsockopt(fd, IPPROTO_TCP, TCP_USER_TIMEOUT, (char *)&conn_timeout_ms, sizeof(conn_timeout_ms))) {
|
if (0 != setsockopt(fd, IPPROTO_TCP, TCP_USER_TIMEOUT, (char *)&conn_timeout_ms, sizeof(conn_timeout_ms))) {
|
||||||
taosCloseSocketNoCheck1(fd);
|
taosCloseSocketNoCheck1(fd);
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in New Issue