From 7bee2b43357a8f3e9644262d005d45dca51a3365 Mon Sep 17 00:00:00 2001 From: Sefinek Date: Sun, 27 Apr 2025 02:28:20 +0200 Subject: [PATCH] Update --- index.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/index.js b/index.js index c7d320c..b41b019 100644 --- a/index.js +++ b/index.js @@ -187,13 +187,11 @@ const processLogLine = async (line, test = false) => { log('The file has been truncated, and the offset has been reset'); } - fs.createReadStream(path, { start: fileOffset, encoding: 'utf8' }) - .on('data', chunk => { - chunk.split('\n').filter(line => line.trim()).forEach(processLogLine); - }) - .on('end', () => { - fileOffset = stats.size; - }); + fs.createReadStream(path, { start: fileOffset, encoding: 'utf8' }).on('data', chunk => { + chunk.split('\n').filter(line => line.trim()).forEach(processLogLine); + }).on('end', () => { + fileOffset = stats.size; + }); }); if (AUTO_UPDATE_ENABLED && AUTO_UPDATE_SCHEDULE && SERVER_ID !== 'development') await require('./scripts/services/updates.js')();