diff --git a/commands.go b/commands.go index 394fbcb..b3861d9 100644 --- a/commands.go +++ b/commands.go @@ -277,9 +277,10 @@ func (handler *CommandHandler) CommandLogout(ce *CommandEvent) { Chats: make(map[string]skype.Conversation), } ce.Reply("Logged out successfully.") - leavePortals(ce) if ce.User.Conn.Refresh != nil { ce.User.Conn.Refresh <- -1 + } else { + leavePortals(ce) } } diff --git a/user.go b/user.go index e022807..40a2118 100644 --- a/user.go +++ b/user.go @@ -396,6 +396,7 @@ func (user *User) monitorSession(ce *CommandEvent) { } else { ce.Reply("Session expired") close(user.Conn.Refresh) + leavePortals(ce) } }