Direct failed remote sends to deadLetters, see #1588

* When Watch is sent to deadLetters it will generate Terminated
* Test: receive Terminated when watched node is unknown host
* Test: receive Terminated when watched path doesn't exist
This commit is contained in:
Patrik Nordwall 2012-09-04 09:55:08 +02:00
parent 6b40ddc755
commit ea59b952ce
2 changed files with 41 additions and 4 deletions

View file

@ -236,6 +236,7 @@ private[akka] class RemoteActorRef private[akka] (
catch {
case e @ (_: InterruptedException | NonFatal(_))
remote.system.eventStream.publish(Error(e, path.toString, classOf[RemoteActorRef], "swallowing exception during message send"))
provider.deadLetters ! message
}
override def !(message: Any)(implicit sender: ActorRef = null): Unit =
@ -243,6 +244,7 @@ private[akka] class RemoteActorRef private[akka] (
catch {
case e @ (_: InterruptedException | NonFatal(_))
remote.system.eventStream.publish(Error(e, path.toString, classOf[RemoteActorRef], "swallowing exception during message send"))
provider.deadLetters ! message
}
def suspend(): Unit = sendSystemMessage(Suspend())