Skip to content

Commit

Permalink
Fix return type
Browse files Browse the repository at this point in the history
  • Loading branch information
nox213 committed Mar 4, 2024
1 parent b36a9e4 commit 3f1c8bc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ private[shardcake] object EntityManager {
private def startExpirationFiber(entityId: String): UIO[Fiber[Nothing, Unit]] = {
val maxIdleTime = entityMaxIdleTime getOrElse config.entityMaxIdleTime

def sleep(duration: Duration): UIO[Any] =
def sleep(duration: Duration): UIO[Unit] =
(Clock.sleep(duration) *> currentTimeInMilliseconds <*> entitiesLastReceivedAt.get).flatMap { case (cdt, map) =>
val lastReceivedAt = map.getOrElse(entityId, 0L)
val remaining = maxIdleTime minus Duration.fromMillis(cdt - lastReceivedAt)
Expand Down

0 comments on commit 3f1c8bc

Please sign in to comment.