From 38dc4f4d161f23653a2e69b199637a6f8f4723c9 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Fri, 2 Oct 2020 13:31:15 +0800 Subject: [PATCH] TD-1645 fix compile error in windotws --- src/rpc/src/rpcTcp.c | 4 ++-- src/rpc/src/rpcUdp.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rpc/src/rpcTcp.c b/src/rpc/src/rpcTcp.c index 2119824b3d..aacdede543 100644 --- a/src/rpc/src/rpcTcp.c +++ b/src/rpc/src/rpcTcp.c @@ -174,7 +174,7 @@ static void taosStopTcpThread(SThreadObj* pThreadObj) { pThreadObj->stop = true; eventfd_t fd = -1; - if (pThreadObj->thread == pthread_self()) { + if (taosComparePthread(pThreadObj->thread, pthread_self())) { pthread_detach(pthread_self()); return; } @@ -207,7 +207,7 @@ void taosStopTcpServer(void *handle) { if(pServerObj->fd >=0) shutdown(pServerObj->fd, SHUT_RD); if (taosCheckPthreadValid(pServerObj->thread)) { - if (pServerObj->thread == pthread_self()) { + if (taosComparePthread(pServerObj->thread, pthread_self())) { pthread_detach(pthread_self()); } else { pthread_join(pServerObj->thread, NULL); diff --git a/src/rpc/src/rpcUdp.c b/src/rpc/src/rpcUdp.c index 250c4c38f2..4fd0318ae6 100644 --- a/src/rpc/src/rpcUdp.c +++ b/src/rpc/src/rpcUdp.c @@ -146,7 +146,7 @@ void taosStopUdpConnection(void *handle) { for (int i = 0; i < pSet->threads; ++i) { pConn = pSet->udpConn + i; if (taosCheckPthreadValid(pConn->thread)) { - if (pConn->thread == pthread_self()) { + if (taosComparePthread(pConn->thread, pthread_self())) { pthread_detach(pthread_self()); } else { pthread_join(pConn->thread, NULL); -- GitLab