diff options
Diffstat (limited to 'vendor/go.mau.fi/whatsmeow/connectionevents.go')
-rw-r--r-- | vendor/go.mau.fi/whatsmeow/connectionevents.go | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/vendor/go.mau.fi/whatsmeow/connectionevents.go b/vendor/go.mau.fi/whatsmeow/connectionevents.go index 2c8d27c0..54fafccf 100644 --- a/vendor/go.mau.fi/whatsmeow/connectionevents.go +++ b/vendor/go.mau.fi/whatsmeow/connectionevents.go @@ -89,11 +89,7 @@ func (cli *Client) handleConnectFailure(node *waBinary.Node) { } } else if reason == events.ConnectFailureTempBanned { cli.Log.Warnf("Temporary ban connect failure: %s", node.XMLString()) - expiryTimeUnix := ag.Int64("expire") - var expiryTime time.Time - if expiryTimeUnix > 0 { - expiryTime = time.Unix(expiryTimeUnix, 0) - } + expiryTime := ag.UnixTime("expire") go cli.dispatchEvent(&events.TemporaryBan{ Code: events.TempBanReason(ag.Int("code")), Expire: expiryTime, @@ -130,6 +126,7 @@ func (cli *Client) handleConnectSuccess(node *waBinary.Node) { cli.Log.Warnf("Failed to send post-connect passive IQ: %v", err) } cli.dispatchEvent(&events.Connected{}) + cli.closeSocketWaitChan() }() } |