提交 38dc4f4d 编写于 作者: S Shengliang Guan

TD-1645 fix compile error in windotws

上级 aa6ff1f5
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册