fix: change socket opt

This commit is contained in:
yihaoDeng 2023-02-13 16:46:42 +08:00
parent 13362841fe
commit 1aee609d36
1 changed files with 1 additions and 1 deletions

View File

@ -1078,7 +1078,7 @@ int32_t taosCreateSocketWithTimeout(uint32_t timeout) {
// return -1;
//}
#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))) {
taosCloseSocketNoCheck1(fd);
return -1;