fix NullMessage handling to not be logged as AutoReceiveMessage

This commit is contained in:
Roland 2012-08-21 14:45:13 +02:00
parent 97e6825bac
commit 2089fcf84c
2 changed files with 4 additions and 5 deletions

View file

@ -359,12 +359,11 @@ private[akka] class ActorCell(
checkReceiveTimeout // Reschedule receive timeout
}
def autoReceiveMessage(msg: Envelope): Unit = {
def autoReceiveMessage(msg: Envelope): Unit = if (msg.message != NullMessage) {
if (system.settings.DebugAutoReceive)
publish(Debug(self.path.toString, clazz(actor), "received AutoReceiveMessage " + msg))
msg.message match {
case NullMessage // do nothing
case Failed(cause, uid) handleFailure(sender, cause, uid)
case t @ Terminated(actor)
getChildByRef(actor) match {

View file

@ -41,10 +41,10 @@ object Envelope {
* This message is sent directly after the Supervise system message in order
* to form a barrier wrt. the first real message sent by the child, so that e.g.
* Failed() cannot overtake Supervise(). Processing this does nothing.
*
*
* Detailed explanation:
*
* The race happens because Supervise and Failed may be queued between the
*
* The race happens because Supervise and Failed may be queued between the
* parent's check for system messages and dequeue(). Thus, if the parent
* processes the NullMessage first (by way of that tiny race window), it is
* guaranteed to then find the Supervise system message in its mailbox prior