From 8950575bfbc97ec80b8648f732c02fad63a6d055 Mon Sep 17 00:00:00 2001 From: Wim Date: Thu, 9 Apr 2020 22:30:08 +0200 Subject: Update Rhymen/go-whatsapp vendor and whatsapp version (#1078) --- vendor/github.com/Rhymen/go-whatsapp/read.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'vendor/github.com/Rhymen/go-whatsapp/read.go') 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) -- cgit v1.2.3