diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-01-04 01:13:46 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-01-04 01:14:05 +0100 |
commit | 1c49a8cd29872ef5b8c2b9df222d054c9c3e7c85 (patch) | |
tree | ed65907c801f614bdffabd8d157d4bdfbf915c38 /public | |
parent | f794c5379baf12d6dbc4b4d02a1e44604e1def00 (diff) | |
download | server-1c49a8cd29872ef5b8c2b9df222d054c9c3e7c85.tar.gz |
Partially revert "Close join page event source once game has started."
Diffstat (limited to 'public')
-rw-r--r-- | public/join.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/public/join.js b/public/join.js index 27bfba0..78d9137 100644 --- a/public/join.js +++ b/public/join.js @@ -102,7 +102,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) { console.log("CLOSED EVENT SOURCE") clearInterval(timer) evtsrc.close() @@ -350,7 +350,7 @@ function update_login() { window.onload = function () { update() - if (user_id && game.status === 0 && !game.is_match) { + if (user_id && game.status <= 1 && !game.is_match) { start_event_source() timer = setInterval(start_event_source, 15000) } |