[TD-13756]<fix>: log file open fail error.

This commit is contained in:
afwerar 2022-04-02 10:54:17 +08:00
parent 131bf46854
commit 563500862f
1 changed files with 1 additions and 1 deletions

View File

@ -354,9 +354,9 @@ static int32_t taosOpenLogFile(char *fn, int32_t maxLines, int32_t maxFileNum) {
return -1;
}
TdFilePtr pOldFile = tsLogObj.logHandle->pFile;
tsLogObj.logHandle->pFile = pFile;
taosUnLockLogFile(pOldFile);
taosCloseFile(&pOldFile);
tsLogObj.logHandle->pFile = pFile;
taosLockLogFile(tsLogObj.logHandle->pFile);
// only an estimate for number of lines