fix: logFileHandle NULL
This commit is contained in:
parent
a3bcd9e9c9
commit
ad1c474dc6
|
@ -242,6 +242,7 @@ void taosCloseLog() {
|
||||||
taosMemoryFreeClear(tsLogObj.logHandle->buffer);
|
taosMemoryFreeClear(tsLogObj.logHandle->buffer);
|
||||||
taosThreadMutexDestroy(&tsLogObj.logMutex);
|
taosThreadMutexDestroy(&tsLogObj.logMutex);
|
||||||
taosMemoryFreeClear(tsLogObj.logHandle);
|
taosMemoryFreeClear(tsLogObj.logHandle);
|
||||||
|
tsLogObj.logHandle = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -347,10 +348,11 @@ void taosResetLog() {
|
||||||
// force create a new log file
|
// force create a new log file
|
||||||
tsLogObj.lines = tsNumOfLogLines + 10;
|
tsLogObj.lines = tsNumOfLogLines + 10;
|
||||||
|
|
||||||
|
if (tsLogObj.logHandle) {
|
||||||
taosOpenNewLogFile();
|
taosOpenNewLogFile();
|
||||||
|
|
||||||
uInfo("==================================");
|
uInfo("==================================");
|
||||||
uInfo(" reset log file ");
|
uInfo(" reset log file ");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool taosCheckFileIsOpen(char *logFileName) {
|
static bool taosCheckFileIsOpen(char *logFileName) {
|
||||||
|
|
Loading…
Reference in New Issue