summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--server.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/server.js b/server.js
index e01b477..37a292e 100644
--- a/server.js
+++ b/server.js
@@ -12,7 +12,8 @@ const sqlite3 = require("better-sqlite3")
require("dotenv").config()
-const DEBUG = process.env.DEBUG || 0
+const DEBUG = process.env.DEBUG | 0
+const TIMEOUT = process.env.TIMEOUT | 0
const ALTCHA = process.env.ALTCHA | 0
const HTTP_HOST = process.env.HTTP_HOST || "localhost"
@@ -2722,8 +2723,10 @@ function time_control_ticker() {
}
// Run time control checks every 13 minutes.
-setInterval(time_control_ticker, 13 * 60 * 1000)
-setTimeout(time_control_ticker, 13 * 1000)
+if (TIMEOUT) {
+ setInterval(time_control_ticker, 13 * 60 * 1000)
+ setTimeout(time_control_ticker, 13 * 1000)
+}
/*
* TOURNAMENTS