only flag with the WS event
that was causing a race condition, the game page would be loaded with the old ongoing game data, but the new socket version from after the game was ended.pull/5767/head
parent
468056dcf2
commit
ebc3690a07
|
@ -75,7 +75,6 @@ final class Round(
|
|||
|
||||
def player(fullId: String) = Open { implicit ctx =>
|
||||
OptionFuResult(env.round.proxyRepo.pov(fullId)) { pov =>
|
||||
env.round.checkOutoftime(pov.game)
|
||||
renderPlayer(pov)
|
||||
}
|
||||
}
|
||||
|
@ -133,7 +132,6 @@ final class Round(
|
|||
Redirect(routes.Round.watcher(gameId, "white")).fuccess
|
||||
}
|
||||
case None => {
|
||||
env.round.checkOutoftime(pov.game)
|
||||
watch(pov)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -182,11 +182,6 @@ final class Env(
|
|||
|
||||
val tvBroadcast = system.actorOf(Props(classOf[TvBroadcast]))
|
||||
|
||||
def checkOutoftime(game: Game): Unit = {
|
||||
if (game.playable && game.started && !game.isUnlimited)
|
||||
tellRound(game.id, actorApi.round.QuietFlag)
|
||||
}
|
||||
|
||||
def resign(pov: Pov): Unit =
|
||||
if (pov.game.abortable) tellRound(pov.gameId, Abort(pov.playerId))
|
||||
else if (pov.game.resignable) tellRound(pov.gameId, Resign(pov.playerId))
|
||||
|
|
Loading…
Reference in New Issue