public void Logout() { if (Connected) { try { SaveSettings(Settings.Username, Settings); RtmpConn.MessageReceived -= RtmpConn_MessageReceived; HeartbeatTimer.Dispose(); new Thread(async() => { Connected = false; CurrentQueue?.Cancel(); CurrentLobby?.Dispose(); await RiotServices.LoginService.Logout(); await RtmpConn.LogoutAsync(); RtmpConn.Close(); }).Start(); } catch { } } ChatManager?.Dispose(); }