summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2021-11-19 02:51:19 +0100
committerTor Andersson <tor@ccxvii.net>2021-11-19 02:51:19 +0100
commitfc1688b688c77d8ff11db45f51855ccce6e74a3a (patch)
treef989c64b74e24a16f1ba75f1dc360bbc131ae321
parent1a71184bcbf714d266e80d186fd666d393ed5981 (diff)
downloadserver-fc1688b688c77d8ff11db45f51855ccce6e74a3a.tar.gz
Keep updates active on join page (for shared role games).
-rw-r--r--public/join.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/public/join.js b/public/join.js
index f79eabc..6828ca6 100644
--- a/public/join.js
+++ b/public/join.js
@@ -60,7 +60,7 @@ function start_event_source() {
evtsrc.addEventListener("game", function (evt) {
console.log("GAME:", evt.data);
game = JSON.parse(evt.data);
- if (game.status > 0) {
+ if (game.status > 1) {
clearInterval(timer);
evtsrc.close();
}
@@ -147,7 +147,7 @@ function update() {
window.onload = function () {
update();
- if (game.status === 0) {
+ if (game.status < 2) {
start_event_source();
timer = setInterval(start_event_source, 15000);
}