public override void BeforeCloseChannel() { if (Settings.ClientType != ClientType.SendAndReceiver_WithoutChat) { Channels.CloseChannel(ref _chatMessagesChannel); Channels.CloseFactory(ref ChatMessagesChannelFactory); } base.BeforeCloseChannel(); }
public void CloseFactories() { if (ClientStatus == ClientStatus.Connected) { new DisconnectCommand <MT, T>(true).ExecuteSafe(this, null); } else { ClientStatus = ClientStatus.NotConnected; } BeforeCloseChannel(); Channels.CloseChannel(ref _mainChannel); Channels.CloseFactory(ref MainChannelFactory); if (BroadcastChannels != null) { BroadcastChannels.Dispose(); BroadcastChannels = null; } }