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

This commit is contained in:
afwerar 2022-04-02 10:33:35 +08:00
parent 42231d7691
commit e9f2c1cdc0
1 changed files with 1 additions and 0 deletions

View File

@ -353,6 +353,7 @@ static int32_t taosOpenLogFile(char *fn, int32_t maxLines, int32_t maxFileNum) {
printf("\nfailed to open log file:%s, reason:%s\n", fileName, strerror(errno)); printf("\nfailed to open log file:%s, reason:%s\n", fileName, strerror(errno));
return -1; return -1;
} }
taosCloseFile(&tsLogObj.logHandle->pFile);
tsLogObj.logHandle->pFile = pFile; tsLogObj.logHandle->pFile = pFile;
taosLockLogFile(tsLogObj.logHandle->pFile); taosLockLogFile(tsLogObj.logHandle->pFile);