From a6c27d63d295b74a63aca1014ffdcecff5828893 Mon Sep 17 00:00:00 2001 From: ChrisChrome Date: Wed, 4 Sep 2024 08:17:30 -0600 Subject: [PATCH] This is messy lol --- index.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index f54cd37..0c99ad4 100644 --- a/index.js +++ b/index.js @@ -33,11 +33,9 @@ app.put('/api/connect/:jobid', (req, res) => { } }) ws_[id].open = false; - setInterval(() => { - ws_[id].connection.on('open', () => { - ws_[id].open = true; - }); - }) + ws_[id].connection.on('open', () => { + ws_[id].open = true; + }); ws_[id].connection.on("error", () => { res.status(500); })