Making sure that you cannot go from Mailbox.Closed to anything else

This commit is contained in:
Viktor Klang 2011-09-26 11:50:26 +02:00
parent 29a327aba4
commit e4947de718
2 changed files with 14 additions and 6 deletions

View file

@ -87,7 +87,6 @@ abstract class MessageDispatcher extends Serializable {
object DeadLetterMailbox extends Mailbox {
dispatcherLock.tryLock()
become(Mailbox.Closed)
override def become(newStatus: Mailbox.Status) { super.become(Mailbox.Closed) } //Always transcend to CLOSED to preserve the volatile write
override def dispatcher = null //MessageDispatcher.this
override def enqueue(envelope: Envelope) { envelope.channel sendException new ActorKilledException("Actor has been stopped") }
override def dequeue() = null