From 121afc60470fc3005e9ad4a1da6c36418731e6e5 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Mon, 6 Feb 2023 10:23:25 +0800 Subject: [PATCH] rm invalid param on macos --- source/os/src/osSocket.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/source/os/src/osSocket.c b/source/os/src/osSocket.c index 3c7a1e64ee..66cddd4dbe 100644 --- a/source/os/src/osSocket.c +++ b/source/os/src/osSocket.c @@ -1060,7 +1060,7 @@ int32_t taosCreateSocketWithTimeout(uint32_t timeout) { #if defined(WINDOWS) SOCKET fd; #else - int fd; + int fd; #endif if ((fd = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) == INVALID_SOCKET) { return -1; @@ -1071,11 +1071,12 @@ int32_t taosCreateSocketWithTimeout(uint32_t timeout) { return -1; } #elif defined(_TD_DARWIN_64) - uint32_t conn_timeout_ms = timeout * 1000; - if (0 != setsockopt(fd, IPPROTO_TCP, TCP_CONNECTIONTIMEOUT, (char *)&conn_timeout_ms, sizeof(conn_timeout_ms))) { - taosCloseSocketNoCheck1(fd); - return -1; - } + // invalid config + // uint32_t conn_timeout_ms = timeout * 1000; + // if (0 != setsockopt(fd, IPPROTO_TCP, TCP_CONNECTIONTIMEOUT, (char *)&conn_timeout_ms, sizeof(conn_timeout_ms))) { + // taosCloseSocketNoCheck1(fd); + // return -1; + //} #else // Linux like systems uint32_t conn_timeout_ms = timeout * 1000; if (0 != setsockopt(fd, IPPROTO_TCP, TCP_USER_TIMEOUT, (char *)&conn_timeout_ms, sizeof(conn_timeout_ms))) {