Skip to content

Commit

Permalink
fix regression where broadcast round is marked as started without mov…
Browse files Browse the repository at this point in the history
…es played
  • Loading branch information
ornicar committed Jun 26, 2024
1 parent 73008f9 commit 223488a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modules/relay/src/main/RelayFetch.scala
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ final private class RelayFetch(
lila.mon.relay.moves(tour.official, round.slug).increment(result.nbMoves)
if !round.hasStarted && !tour.official then
irc.broadcastStart(round.id, round.withTour(tour).fullName)
continueRelay(tour, updating(_.ensureStarted.resume(tour.official)))
continueRelay(tour, updating(_.ensureStarted.resume(tour.official)))
else continueRelay(tour, updating)
case _ => continueRelay(tour, updating)

private def continueRelay(tour: RelayTour, updating: Updating[RelayRound]): Updating[RelayRound] =
Expand Down Expand Up @@ -212,7 +213,7 @@ final private class RelayFetch(
type LccGameKey = String
private val finishedGames =
cacheApi.notLoadingSync[LccGameKey, GameJson](512, "relay.fetch.finishedLccGames"):
_.expireAfterWrite(3 minutes).build()
_.expireAfterWrite(5 minutes).build()
def apply(lcc: RelayRound.Sync.Lcc, index: Int, roundTags: Tags)(
fetch: () => Fu[GameJson]
): Fu[GameJson] =
Expand Down

0 comments on commit 223488a

Please sign in to comment.