TD-1645 fix compile error in windotws
This commit is contained in:
parent
aa6ff1f5dc
commit
38dc4f4d16
|
@ -174,7 +174,7 @@ static void taosStopTcpThread(SThreadObj* pThreadObj) {
|
||||||
pThreadObj->stop = true;
|
pThreadObj->stop = true;
|
||||||
eventfd_t fd = -1;
|
eventfd_t fd = -1;
|
||||||
|
|
||||||
if (pThreadObj->thread == pthread_self()) {
|
if (taosComparePthread(pThreadObj->thread, pthread_self())) {
|
||||||
pthread_detach(pthread_self());
|
pthread_detach(pthread_self());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -207,7 +207,7 @@ void taosStopTcpServer(void *handle) {
|
||||||
if(pServerObj->fd >=0) shutdown(pServerObj->fd, SHUT_RD);
|
if(pServerObj->fd >=0) shutdown(pServerObj->fd, SHUT_RD);
|
||||||
|
|
||||||
if (taosCheckPthreadValid(pServerObj->thread)) {
|
if (taosCheckPthreadValid(pServerObj->thread)) {
|
||||||
if (pServerObj->thread == pthread_self()) {
|
if (taosComparePthread(pServerObj->thread, pthread_self())) {
|
||||||
pthread_detach(pthread_self());
|
pthread_detach(pthread_self());
|
||||||
} else {
|
} else {
|
||||||
pthread_join(pServerObj->thread, NULL);
|
pthread_join(pServerObj->thread, NULL);
|
||||||
|
|
|
@ -146,7 +146,7 @@ void taosStopUdpConnection(void *handle) {
|
||||||
for (int i = 0; i < pSet->threads; ++i) {
|
for (int i = 0; i < pSet->threads; ++i) {
|
||||||
pConn = pSet->udpConn + i;
|
pConn = pSet->udpConn + i;
|
||||||
if (taosCheckPthreadValid(pConn->thread)) {
|
if (taosCheckPthreadValid(pConn->thread)) {
|
||||||
if (pConn->thread == pthread_self()) {
|
if (taosComparePthread(pConn->thread, pthread_self())) {
|
||||||
pthread_detach(pthread_self());
|
pthread_detach(pthread_self());
|
||||||
} else {
|
} else {
|
||||||
pthread_join(pConn->thread, NULL);
|
pthread_join(pConn->thread, NULL);
|
||||||
|
|
Loading…
Reference in New Issue