mirror of
https://github.com/42wim/matterbridge.git
synced 2024-11-28 13:42:01 -08: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")
|
flog.Info("Connection succeeded")
|
||||||
b.TeamId = b.mc.GetTeamId()
|
b.TeamId = b.mc.GetTeamId()
|
||||||
go b.mc.WsReceiver()
|
go b.mc.WsReceiver()
|
||||||
|
go b.mc.StatusLoop()
|
||||||
}
|
}
|
||||||
go b.handleMatter()
|
go b.handleMatter()
|
||||||
return nil
|
return nil
|
||||||
|
@ -178,6 +178,7 @@ func (m *MMClient) Login() error {
|
|||||||
}
|
}
|
||||||
b.Reset()
|
b.Reset()
|
||||||
|
|
||||||
|
m.log.Debug("WsClient: connected")
|
||||||
m.WsSequence = 1
|
m.WsSequence = 1
|
||||||
m.WsPingChan = make(chan *model.WebSocketResponse)
|
m.WsPingChan = make(chan *model.WebSocketResponse)
|
||||||
// only start to parse WS messages when login is completely done
|
// only start to parse WS messages when login is completely done
|
||||||
@ -630,6 +631,7 @@ func (m *MMClient) StatusLoop() {
|
|||||||
m.Logout()
|
m.Logout()
|
||||||
m.WsQuit = false
|
m.WsQuit = false
|
||||||
m.Login()
|
m.Login()
|
||||||
|
go m.WsReceiver()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
time.Sleep(time.Second * 60)
|
time.Sleep(time.Second * 60)
|
||||||
|
Loading…
Reference in New Issue
Block a user