mirror of
https://github.com/42wim/matterbridge.git
synced 2024-12-21 02:22:34 +01:00
Break when re-login fails (mattermost)
This commit is contained in:
parent
aff3964078
commit
2fd1fd9573
@ -817,9 +817,14 @@ func (m *MMClient) StatusLoop() {
|
|||||||
backoff = time.Second * 60
|
backoff = time.Second * 60
|
||||||
case <-time.After(time.Second * 5):
|
case <-time.After(time.Second * 5):
|
||||||
if retries > 3 {
|
if retries > 3 {
|
||||||
|
m.log.Debug("StatusLoop() timeout")
|
||||||
m.Logout()
|
m.Logout()
|
||||||
m.WsQuit = false
|
m.WsQuit = false
|
||||||
m.Login()
|
err := m.Login()
|
||||||
|
if err != nil {
|
||||||
|
log.Errorf("Login failed: %#v", err)
|
||||||
|
break
|
||||||
|
}
|
||||||
if m.OnWsConnect != nil {
|
if m.OnWsConnect != nil {
|
||||||
m.OnWsConnect()
|
m.OnWsConnect()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user