fix dormant bug in Mailbox’s error logging
- actor.actor could potentially be null after a failed restart attempt - fix one case of baroqueness in FaultHandling.scala
This commit is contained in:
parent
e28f284c3c
commit
e81791cbb6
2 changed files with 5 additions and 5 deletions
|
|
@ -13,10 +13,10 @@ case class ChildRestartStats(val child: ActorRef, var maxNrOfRetriesCount: Int =
|
||||||
|
|
||||||
def requestRestartPermission(retriesWindow: (Option[Int], Option[Int])): Boolean =
|
def requestRestartPermission(retriesWindow: (Option[Int], Option[Int])): Boolean =
|
||||||
retriesWindow match {
|
retriesWindow match {
|
||||||
case (Some(retries), _) if retries < 1 ⇒ false
|
case (Some(retries), _) if retries < 1 ⇒ false
|
||||||
case (Some(retries), None) ⇒ maxNrOfRetriesCount += 1; maxNrOfRetriesCount <= retries
|
case (Some(retries), None) ⇒ maxNrOfRetriesCount += 1; maxNrOfRetriesCount <= retries
|
||||||
case (x @ (Some(_) | None), Some(window)) ⇒ retriesInWindowOkay(if (x.isDefined) x.get else 1, window)
|
case (x, Some(window)) ⇒ retriesInWindowOkay(if (x.isDefined) x.get else 1, window)
|
||||||
case (None, _) ⇒ true
|
case (None, _) ⇒ true
|
||||||
}
|
}
|
||||||
|
|
||||||
private def retriesInWindowOkay(retries: Int, window: Int): Boolean = {
|
private def retriesInWindowOkay(retries: Int, window: Int): Boolean = {
|
||||||
|
|
|
||||||
|
|
@ -214,7 +214,7 @@ private[akka] abstract class Mailbox(val actor: ActorCell) extends MessageQueue
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
case e ⇒
|
case e ⇒
|
||||||
actor.system.eventStream.publish(Error(e, actor.self.path.toString, actor.actor.getClass, "exception during processing system messages, dropping " + SystemMessage.size(nextMessage) + " messages!"))
|
actor.system.eventStream.publish(Error(e, actor.self.path.toString, this.getClass, "exception during processing system messages, dropping " + SystemMessage.size(nextMessage) + " messages!"))
|
||||||
throw e
|
throw e
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue