5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-26 12:21:35 +00:00

Don't logout if logging in through token. (from @recht matterircd fork)

This commit is contained in:
Wim 2017-07-01 22:41:28 +02:00
parent 877f0fe2e8
commit d261949db2

View File

@ -229,6 +229,10 @@ func (m *MMClient) Logout() error {
m.WsQuit = true m.WsQuit = true
m.WsClient.Close() m.WsClient.Close()
m.WsClient.UnderlyingConn().Close() m.WsClient.UnderlyingConn().Close()
if strings.Contains(m.Credentials.Pass, model.SESSION_COOKIE_TOKEN) {
m.log.Debug("Not invalidating session in logout, credential is a token")
return nil
}
_, err := m.Client.Logout() _, err := m.Client.Logout()
if err != nil { if err != nil {
return err return err