From ac502936c97121e10143f1ffbd4e2e45c2ef7ac9 Mon Sep 17 00:00:00 2001 From: Wizzard Date: Fri, 1 Sep 2023 09:02:44 -0400 Subject: [PATCH] Remove auto restart timer hotfix --- main.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/main.js b/main.js index e02853a..2f42528 100644 --- a/main.js +++ b/main.js @@ -7,7 +7,6 @@ const config = JSON.parse(fs.readFileSync("config.json")); const updateInterval = 5000; const retryInterval = 30000; -const maxUptime = 3 * 60 * 60 * 1000; // Maximum uptime before restart (3 hours) let rp; let startTime = Date.now(); @@ -72,11 +71,6 @@ async function updateStatus() { console.log("Discord status updated. Current track: " + data.trackName + ", Artist: " + data.artist); - // check if uptime exceeds maximum uptime - if ((Date.now() - startTime) > maxUptime) { - console.log("Max uptime reached, restarting process..."); - process.exit(0); - } setTimeout(updateStatus, updateInterval); } catch (error) {