Skip to content

Commit

Permalink
Update gamestate on GET
Browse files Browse the repository at this point in the history
  • Loading branch information
eljeffeg committed Jan 17, 2020
1 parent b8b12a3 commit 2a39f07
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion handlers/ScoreboardHandlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ def on_message(self, message):
if self.application.settings["freeze_scoreboard"]:
self.write_message("pause")
elif datetime.now() - self.last_message > timedelta(seconds=3):
self.last_message = datetime.now()
Scoreboard.update_gamestate(self)
self.last_message = datetime.now()
self.write_message(Scoreboard.now(self))

def on_close(self):
Expand All @@ -82,6 +82,7 @@ class ScoreboardHandler(BaseHandler):
def get(self, *args, **kargs):
user = self.get_current_user()
if scoreboard_visible(user):
Scoreboard.update_gamestate(self)
self.render("scoreboard/summary.html", timer=self.timer())
elif not user:
self.redirect("/login")
Expand Down

0 comments on commit 2a39f07

Please sign in to comment.