Merge pull request #19957 from taosdata/fix/fixTransOpt

fix: change socket opt
This commit is contained in:
dapan1121 2023-02-14 11:17:25 +08:00 committed by GitHub
commit 83dda59d62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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;