Don't SEGFAULT

This commit is contained in:
Amos Bird 2019-07-15 10:07:59 +08:00
parent 6d12c685f7
commit 5f7ee42c95
1 changed files with 1 additions and 1 deletions

View File

@ -110,7 +110,7 @@ void taosStopLog() {
void taosCloseLogger() {
taosStopLog();
sem_post(&(logHandle->buffNotEmpty));
pthread_join(logHandle->asyncThread, NULL);
if (logHandle->asyncThread) pthread_join(logHandle->asyncThread, NULL);
// In case that other threads still use log resources causing invalid write in
// valgrind, we comment two lines below.
// taosLogBuffDestroy(logHandle);