|
@@ -169,6 +169,9 @@ func (m *MailBox) Tell(msg protocol.ActorMsg) {
|
|
|
|
|
|
// push a message to queue
|
|
|
func (m *MailBox) enqueue(msg protocol.ActorMsg, isHighPriority bool) {
|
|
|
+ if m.closed {
|
|
|
+ return
|
|
|
+ }
|
|
|
if isHighPriority {
|
|
|
m.highPriorityMessages.Push(msg)
|
|
|
} else {
|
|
@@ -210,7 +213,7 @@ func (m *MailBox) BroadcastChildren(msg protocol.ActorMsg) error {
|
|
|
}
|
|
|
|
|
|
func (m *MailBox) destroy() error {
|
|
|
- server.Log.Debugf("Going to destroy mailbox:%s", m.id)
|
|
|
+ server.Log.Errorf("Going to destroy mailbox:%s", m.id)
|
|
|
m.mu.Lock()
|
|
|
defer m.mu.Unlock()
|
|
|
if m.closed {
|