提交 131bf468 编写于 作者: wafwerar's avatar wafwerar

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

上级 e9f2c1cd
...@@ -353,7 +353,9 @@ static int32_t taosOpenLogFile(char *fn, int32_t maxLines, int32_t maxFileNum) { ...@@ -353,7 +353,9 @@ 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); TdFilePtr pOldFile = tsLogObj.logHandle->pFile;
taosUnLockLogFile(pOldFile);
taosCloseFile(&pOldFile);
tsLogObj.logHandle->pFile = pFile; tsLogObj.logHandle->pFile = pFile;
taosLockLogFile(tsLogObj.logHandle->pFile); taosLockLogFile(tsLogObj.logHandle->pFile);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册