mirror of
https://github.com/leon-ai/leon.git
synced 2024-11-28 04:04:58 +03:00
fix(server): close error log file handler
This commit is contained in:
parent
9a66b677e0
commit
0947bd7877
@ -90,7 +90,9 @@ export class LogHelper {
|
||||
*/
|
||||
public static async parseErrorLogs(): Promise<string[]> {
|
||||
if (!fs.existsSync(LogHelper.ERRORS_FILE_PATH)) {
|
||||
await fs.promises.open(LogHelper.ERRORS_FILE_PATH, 'w')
|
||||
const fileHandle = await fs.promises.open(LogHelper.ERRORS_FILE_PATH, 'w')
|
||||
|
||||
await fileHandle.close()
|
||||
}
|
||||
|
||||
const errorFileContent = await fs.promises.readFile(
|
||||
|
Loading…
Reference in New Issue
Block a user