Revert "try non-blocking round actions (risking DB race conditions)"
This reverts commit 55bdc66645
.
This commit is contained in:
parent
e3774a6488
commit
bce0f77aea
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue