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) {
|
||||
pThread = pServer->pThreads + i;
|
||||
if (pThread == NULL) continue;
|
||||
//taosCloseSocket(pThread->pollFd);
|
||||
|
||||
while (pThread->pHead) {
|
||||
httpCleanUpContext(pThread->pHead, 0);
|
||||
}
|
||||
//while (pThread->pHead) {
|
||||
// httpCleanUpContext(pThread->pHead, 0);
|
||||
//}
|
||||
|
||||
pthread_cancel(pThread->thread);
|
||||
pthread_join(pThread->thread, NULL);
|
||||
|
|
|
@ -131,7 +131,11 @@ void httpCleanUpSystem() {
|
|||
httpServer->timerHandle = NULL;
|
||||
}
|
||||
|
||||
httpCleanUpConnect(httpServer);
|
||||
if (httpServer->pThreads != NULL) {
|
||||
httpCleanUpConnect(httpServer);
|
||||
httpServer->pThreads = NULL;
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
httpRemoveAllSessions(httpServer);
|
||||
|
|
Loading…
Reference in New Issue