fix: log thread quit issue
This commit is contained in:
parent
9551a269b3
commit
28bff83096
|
@ -201,6 +201,11 @@ static void taosStopLog() {
|
||||||
void taosCloseLog() {
|
void taosCloseLog() {
|
||||||
taosStopLog();
|
taosStopLog();
|
||||||
|
|
||||||
|
if (tsLogObj.logHandle != NULL && taosCheckPthreadValid(tsLogObj.logHandle->asyncThread)) {
|
||||||
|
taosThreadJoin(tsLogObj.logHandle->asyncThread, NULL);
|
||||||
|
taosThreadClear(&tsLogObj.logHandle->asyncThread);
|
||||||
|
}
|
||||||
|
|
||||||
if (tsLogObj.slowHandle != NULL) {
|
if (tsLogObj.slowHandle != NULL) {
|
||||||
taosThreadMutexDestroy(&tsLogObj.slowHandle->buffMutex);
|
taosThreadMutexDestroy(&tsLogObj.slowHandle->buffMutex);
|
||||||
taosCloseFile(&tsLogObj.slowHandle->pFile);
|
taosCloseFile(&tsLogObj.slowHandle->pFile);
|
||||||
|
@ -209,10 +214,6 @@ void taosCloseLog() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tsLogObj.logHandle != NULL) {
|
if (tsLogObj.logHandle != NULL) {
|
||||||
if (tsLogObj.logHandle != NULL && taosCheckPthreadValid(tsLogObj.logHandle->asyncThread)) {
|
|
||||||
taosThreadJoin(tsLogObj.logHandle->asyncThread, NULL);
|
|
||||||
taosThreadClear(&tsLogObj.logHandle->asyncThread);
|
|
||||||
}
|
|
||||||
tsLogInited = 0;
|
tsLogInited = 0;
|
||||||
|
|
||||||
taosThreadMutexDestroy(&tsLogObj.logHandle->buffMutex);
|
taosThreadMutexDestroy(&tsLogObj.logHandle->buffMutex);
|
||||||
|
|
Loading…
Reference in New Issue