fix isEvent

This commit is contained in:
Marcelo Pires 2018-09-07 15:40:44 +02:00
parent 58a5ed8a3f
commit 66218f4616
2 changed files with 6 additions and 1 deletions

View File

@ -98,6 +98,9 @@ func IsMetaMessage(msg *message.Message) bool {
}
func IsEventDelivery(msg *message.Message) bool {
if IsMetaMessage(msg) {
return false
}
if msg.Data != nil {
return true
}
@ -105,6 +108,9 @@ func IsEventDelivery(msg *message.Message) bool {
}
func IsEventPublish(msg *message.Message) bool {
if IsMetaMessage(msg) {
return false
}
return !IsEventDelivery(msg)
}

View File

@ -154,7 +154,6 @@ func (w *Websocket) readWorker() error {
}
}
}
}
w.subsMu2.Unlock()