summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/Rhymen/go-whatsapp/read.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/Rhymen/go-whatsapp/read.go')
-rw-r--r--vendor/github.com/Rhymen/go-whatsapp/read.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/vendor/github.com/Rhymen/go-whatsapp/read.go b/vendor/github.com/Rhymen/go-whatsapp/read.go
index 1621c0f5..a69147a6 100644
--- a/vendor/github.com/Rhymen/go-whatsapp/read.go
+++ b/vendor/github.com/Rhymen/go-whatsapp/read.go
@@ -83,10 +83,8 @@ func (wac *Conn) processReadData(msgType int, msg []byte) error {
// chan string to something like chan map[string]interface{}. The unmarshalling
// in several places, especially in session.go, would then be gone.
listener <- data[1]
-
- wac.listener.Lock()
- delete(wac.listener.m, data[0])
- wac.listener.Unlock()
+ close(listener)
+ wac.removeListener(data[0])
} else if msgType == websocket.BinaryMessage {
wac.loginSessionLock.RLock()
sess := wac.session