Update whatsapp vendor and fix a panic (#1209)
* Fix another whatsapp panic * Update whatsapp vendor
This commit is contained in:
11
vendor/github.com/Rhymen/go-whatsapp/read.go
generated
vendored
11
vendor/github.com/Rhymen/go-whatsapp/read.go
generated
vendored
@@ -5,13 +5,14 @@ import (
|
||||
"crypto/sha256"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"strings"
|
||||
|
||||
"github.com/Rhymen/go-whatsapp/binary"
|
||||
"github.com/Rhymen/go-whatsapp/crypto/cbc"
|
||||
"github.com/gorilla/websocket"
|
||||
"github.com/pkg/errors"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func (wac *Conn) readPump() {
|
||||
@@ -27,7 +28,9 @@ func (wac *Conn) readPump() {
|
||||
for {
|
||||
readerFound := make(chan struct{})
|
||||
go func() {
|
||||
msgType, reader, readErr = wac.ws.conn.NextReader()
|
||||
if wac.ws != nil {
|
||||
msgType, reader, readErr = wac.ws.conn.NextReader()
|
||||
}
|
||||
close(readerFound)
|
||||
}()
|
||||
select {
|
||||
|
||||
Reference in New Issue
Block a user