From 498c0e4130b2acb68d28d41bce569bde7e4cddb1 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Mon, 27 May 2019 14:15:45 +0300 Subject: [PATCH] Ignore invalid data received errors --- user.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/user.go b/user.go index 586c22c..b97bd8a 100644 --- a/user.go +++ b/user.go @@ -25,6 +25,7 @@ import ( "sync" "time" + "github.com/pkg/errors" "github.com/skip2/go-qrcode" log "maunium.net/go/maulogger/v2" @@ -344,7 +345,7 @@ func (user *User) updateLastConnectionIfNecessary() { } func (user *User) HandleError(err error) { - if err != whatsapp.ErrInvalidWsData { + if errors.Cause(err) != whatsapp.ErrInvalidWsData { user.log.Errorln("WhatsApp error:", err) } var msg string