public async Task DisconnectAsync() { if (!IsConnected) { return; } try { await hubConnection.DisposeAsync(); } catch (Exception ex) { Debug.WriteLine(ex); } ActiveChannels.Clear(); IsConnected = false; }
private void IrcClient_OnDisconnected(object sender, EventArgs e) { ActiveChannels.Clear(); Console.WriteLine("! Disconnected"); ErrorLogging.WriteLine("! Disconnected"); }