From e50968e0c1d54590a6ad37b14a4bc06c08385272 Mon Sep 17 00:00:00 2001 From: ChrisChrome Date: Sun, 31 Aug 2025 10:46:31 -0600 Subject: [PATCH] Possibly fix startup? --- index.js | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/index.js b/index.js index cca3500..5b5ce11 100644 --- a/index.js +++ b/index.js @@ -78,19 +78,10 @@ app.listen(port, host, (err) => { } global.log.info(`Listening on port ${host}:${port}`); global.log.debug(`DSN: ${DSN}`); - db.getConnection() - .then(conn => { - return conn.query('SELECT 1 FROM ACL LIMIT 1') - .then(() => { - global.log.info('Database connection validated with ACL table.'); - dbReady = true; - conn.release(); - }) - .catch(err => { - global.log.error(`Database ACL validation failed: ${err}`); - conn.release(); - process.exit(1); - }); + db.query("SELECT * FROM ACL LIMIT 1;") + .then(() => { + dbReady = true; + global.log.info("Database connection established"); }) .catch(err => { global.log.error(`Database connection failed: ${err}`);