Avoid broken state on a failed logout attempt
This commit is contained in:
parent
f56e6ac187
commit
67c38823f2
|
@ -279,16 +279,15 @@ func (c *Client) ProcessTransportCommand(cmdline string, resource string) string
|
|||
return notOnline
|
||||
}
|
||||
|
||||
for _, id := range c.cache.ChatsKeys() {
|
||||
c.unsubscribe(id)
|
||||
}
|
||||
|
||||
_, err := c.client.LogOut()
|
||||
if err != nil {
|
||||
c.forceClose()
|
||||
return errors.Wrap(err, "Logout error").Error()
|
||||
}
|
||||
|
||||
for _, id := range c.cache.ChatsKeys() {
|
||||
c.unsubscribe(id)
|
||||
}
|
||||
|
||||
c.Session.Login = ""
|
||||
// cancel auth
|
||||
case "cancelauth":
|
||||
|
|
Loading…
Reference in a new issue