From 66218f4616d5ce527017fc071d5c057a3ddd1ffb Mon Sep 17 00:00:00 2001 From: Marcelo Pires Date: Fri, 7 Sep 2018 15:40:44 +0200 Subject: [PATCH] fix isEvent --- transport/transport.go | 6 ++++++ transport/websocket/websocket.go | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/transport/transport.go b/transport/transport.go index 86a1cd9..25bf221 100644 --- a/transport/transport.go +++ b/transport/transport.go @@ -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) } diff --git a/transport/websocket/websocket.go b/transport/websocket/websocket.go index c11f21e..0528ebd 100644 --- a/transport/websocket/websocket.go +++ b/transport/websocket/websocket.go @@ -154,7 +154,6 @@ func (w *Websocket) readWorker() error { } } } - } w.subsMu2.Unlock()