diff options
author | Wim <wim@42.be> | 2017-11-16 20:19:52 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2017-11-16 20:19:52 +0100 |
commit | 2fd1fd9573c4e297ecbc45a0be184450fb034f75 (patch) | |
tree | e84fdf9bac96111023d2bb6ed9571fcc6863674c /matterclient/matterclient.go | |
parent | aff39640781cd7af28421fc2a97dcb4e93b467e2 (diff) | |
download | matterbridge-msglm-2fd1fd9573c4e297ecbc45a0be184450fb034f75.tar.gz matterbridge-msglm-2fd1fd9573c4e297ecbc45a0be184450fb034f75.tar.bz2 matterbridge-msglm-2fd1fd9573c4e297ecbc45a0be184450fb034f75.zip |
Break when re-login fails (mattermost)
Diffstat (limited to 'matterclient/matterclient.go')
-rw-r--r-- | matterclient/matterclient.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/matterclient/matterclient.go b/matterclient/matterclient.go index 0b5f0a07..e43fd223 100644 --- a/matterclient/matterclient.go +++ b/matterclient/matterclient.go @@ -817,9 +817,14 @@ func (m *MMClient) StatusLoop() { backoff = time.Second * 60 case <-time.After(time.Second * 5): if retries > 3 { + m.log.Debug("StatusLoop() timeout") m.Logout() m.WsQuit = false - m.Login() + err := m.Login() + if err != nil { + log.Errorf("Login failed: %#v", err) + break + } if m.OnWsConnect != nil { m.OnWsConnect() } |