diff options
author | Wim <wim@42.be> | 2020-04-09 22:30:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-09 22:30:08 +0200 |
commit | 8950575bfbc97ec80b8648f732c02fad63a6d055 (patch) | |
tree | bc6815de4a0cb1a2c7d9bf0796d173b2a356d7b0 /vendor/github.com/Rhymen/go-whatsapp/read.go | |
parent | 11fc4c286fbcd6c1519362d2b0123ebd4ab19067 (diff) | |
download | matterbridge-msglm-8950575bfbc97ec80b8648f732c02fad63a6d055.tar.gz matterbridge-msglm-8950575bfbc97ec80b8648f732c02fad63a6d055.tar.bz2 matterbridge-msglm-8950575bfbc97ec80b8648f732c02fad63a6d055.zip |
Update Rhymen/go-whatsapp vendor and whatsapp version (#1078)
Diffstat (limited to 'vendor/github.com/Rhymen/go-whatsapp/read.go')
-rw-r--r-- | vendor/github.com/Rhymen/go-whatsapp/read.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/vendor/github.com/Rhymen/go-whatsapp/read.go b/vendor/github.com/Rhymen/go-whatsapp/read.go index 42d91ff4..b870f5f8 100644 --- a/vendor/github.com/Rhymen/go-whatsapp/read.go +++ b/vendor/github.com/Rhymen/go-whatsapp/read.go @@ -15,7 +15,10 @@ import ( ) func (wac *Conn) readPump() { - defer wac.wg.Done() + defer func() { + wac.wg.Done() + _, _ = wac.Disconnect() + }() var readErr error var msgType int @@ -31,7 +34,6 @@ func (wac *Conn) readPump() { case <-readerFound: if readErr != nil { wac.handle(&ErrConnectionFailed{Err: readErr}) - _, _ = wac.Disconnect() return } msg, err := ioutil.ReadAll(reader) |