summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-01-02 13:20:05 +0100
committerTor Andersson <tor@ccxvii.net>2024-01-02 13:20:11 +0100
commitc7fb66f0903d4d7b7e6c04dc33a3e5e9d3a3068d (patch)
tree44d3d89867a55a39109dedf15ea73cf7b0f287f7
parent42be5936901defc8f1850c650c033dcff8ee510c (diff)
downloadserver-c7fb66f0903d4d7b7e6c04dc33a3e5e9d3a3068d.tar.gz
Fix order of sending player and game state update to client.
Since we now close the event source when a game starts, make sure to send the updated player list before the game data.
-rw-r--r--server.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/server.js b/server.js
index 8130397..3b0792f 100644
--- a/server.js
+++ b/server.js
@@ -2005,8 +2005,8 @@ function start_game(game) {
SQL_ROLLBACK.run()
}
- update_join_clients_game(game.game_id)
update_join_clients_players(game.game_id)
+ update_join_clients_game(game.game_id)
send_game_started_notification_to_offline_users(game.game_id)
send_your_turn_notification_to_offline_users(game.game_id, null, state.active)