mirror of
https://github.com/42wim/matterbridge.git
synced 2024-12-18 17:12:37 +01:00
Reconnect on session removal (mattermost)
This commit is contained in:
parent
bd38319d83
commit
89c66b9430
@ -72,6 +72,7 @@ func (b *Bmattermost) Connect() error {
|
||||
flog.Info("Connection succeeded")
|
||||
b.TeamId = b.mc.GetTeamId()
|
||||
go b.mc.WsReceiver()
|
||||
go b.mc.StatusLoop()
|
||||
}
|
||||
go b.handleMatter()
|
||||
return nil
|
||||
|
@ -178,6 +178,7 @@ func (m *MMClient) Login() error {
|
||||
}
|
||||
b.Reset()
|
||||
|
||||
m.log.Debug("WsClient: connected")
|
||||
m.WsSequence = 1
|
||||
m.WsPingChan = make(chan *model.WebSocketResponse)
|
||||
// only start to parse WS messages when login is completely done
|
||||
@ -630,6 +631,7 @@ func (m *MMClient) StatusLoop() {
|
||||
m.Logout()
|
||||
m.WsQuit = false
|
||||
m.Login()
|
||||
go m.WsReceiver()
|
||||
}
|
||||
}
|
||||
time.Sleep(time.Second * 60)
|
||||
|
Loading…
Reference in New Issue
Block a user