TD-1645 fix compile error in windotws

This commit is contained in:
Shengliang Guan 2020-10-02 13:31:15 +08:00
parent aa6ff1f5dc
commit 38dc4f4d16
2 changed files with 3 additions and 3 deletions

View File

@ -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);

View File

@ -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);