From d261949db2de47578812f852d5c6d5c04d202323 Mon Sep 17 00:00:00 2001 From: Wim Date: Sat, 1 Jul 2017 22:41:28 +0200 Subject: Don't logout if logging in through token. (from @recht matterircd fork) --- matterclient/matterclient.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'matterclient') diff --git a/matterclient/matterclient.go b/matterclient/matterclient.go index afcedcd6..4dcc9ae0 100644 --- a/matterclient/matterclient.go +++ b/matterclient/matterclient.go @@ -229,6 +229,10 @@ func (m *MMClient) Logout() error { m.WsQuit = true m.WsClient.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() if err != nil { return err -- cgit v1.2.3