stop srv gracefully

This commit is contained in:
yihaoDeng 2022-01-26 19:19:49 +08:00
parent e864b0a146
commit d6e8a0ede1
1 changed files with 2 additions and 0 deletions

View File

@ -646,6 +646,7 @@ void destroyWorkThrd(SWorkThrdObj* pThrd) {
if (pThrd == NULL) {
return;
}
uv_stop(pThrd->loop);
pthread_join(pThrd->thread, NULL);
// free(srv->pipe[i]);
free(pThrd->loop);
@ -658,6 +659,7 @@ void taosCloseServer(void* arg) {
for (int i = 0; i < srv->numOfThreads; i++) {
destroyWorkThrd(srv->pThreadObj[i]);
}
uv_stop(srv->loop);
free(srv->loop);
free(srv->pipe);
free(srv->pThreadObj);