From e0320729006baf24a165b0b715477d29f29c0d9b Mon Sep 17 00:00:00 2001
From: LouisLam <louislam@users.noreply.github.com>
Date: Fri, 30 Jul 2021 15:13:51 +0800
Subject: [PATCH] eslint: allow while (true)

---
 .eslintrc.js       | 3 +++
 server/database.js | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/.eslintrc.js b/.eslintrc.js
index 14dbe41f..3283fa5a 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -61,6 +61,9 @@ module.exports = {
         "space-infix-ops": "warn",
         "arrow-spacing": "warn",
         "no-trailing-spaces": "warn",
+        "no-constant-condition": ["error", {
+            "checkLoops": false,
+        }],
         "space-before-blocks": "warn",
         //'no-console': 'warn',
         "no-extra-boolean-cast": "off",
diff --git a/server/database.js b/server/database.js
index ab734041..571313bc 100644
--- a/server/database.js
+++ b/server/database.js
@@ -100,7 +100,7 @@ class Database {
 
         console.log("Closing DB")
 
-        for (;;) {
+        while (true) {
             Database.noReject = true;
             await R.close()
             await sleep(2000)