Revert "try non-blocking round actions (risking DB race conditions)"

This reverts commit 55bdc66645.
This commit is contained in:
Thibault Duplessis 2013-09-21 09:37:46 +02:00
parent e3774a6488
commit bce0f77aea

View file

@ -104,9 +104,10 @@ private[round] final class Round(
private def blockAndPublish[A](context: Fu[Option[A]], timeout: FiniteDuration = 3.seconds)(op: A Fu[Events]) {
try {
context flatten "[round] not found" flatMap op foreach { events
if (events.nonEmpty) socketHub ! Tell(gameId, events)
}
val events = {
context flatten "[round] not found" flatMap op
} await makeTimeout(timeout)
if (events.nonEmpty) socketHub ! Tell(gameId, events)
}
catch {
case e: lila.common.LilaException logwarn("[round] " + e.message)