crash while release http
This commit is contained in:
parent
7aebf9d502
commit
740af8eaf7
|
@ -269,11 +269,12 @@ void httpCleanUpConnect(HttpServer *pServer) {
|
||||||
|
|
||||||
for (i = 0; i < pServer->numOfThreads; ++i) {
|
for (i = 0; i < pServer->numOfThreads; ++i) {
|
||||||
pThread = pServer->pThreads + i;
|
pThread = pServer->pThreads + i;
|
||||||
|
if (pThread == NULL) continue;
|
||||||
//taosCloseSocket(pThread->pollFd);
|
//taosCloseSocket(pThread->pollFd);
|
||||||
|
|
||||||
while (pThread->pHead) {
|
//while (pThread->pHead) {
|
||||||
httpCleanUpContext(pThread->pHead, 0);
|
// httpCleanUpContext(pThread->pHead, 0);
|
||||||
}
|
//}
|
||||||
|
|
||||||
pthread_cancel(pThread->thread);
|
pthread_cancel(pThread->thread);
|
||||||
pthread_join(pThread->thread, NULL);
|
pthread_join(pThread->thread, NULL);
|
||||||
|
|
|
@ -131,7 +131,11 @@ void httpCleanUpSystem() {
|
||||||
httpServer->timerHandle = NULL;
|
httpServer->timerHandle = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
httpCleanUpConnect(httpServer);
|
if (httpServer->pThreads != NULL) {
|
||||||
|
httpCleanUpConnect(httpServer);
|
||||||
|
httpServer->pThreads = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
httpRemoveAllSessions(httpServer);
|
httpRemoveAllSessions(httpServer);
|
||||||
|
|
Loading…
Reference in New Issue