private void ConnectionClose(ClientConnection client) { logger.Info($"{client.SocketConnection.ConnectionInfo.Id}: The connection is no longer available"); try { client.Disconnect(); } catch (Exception ex) { logger.Debug(ex, $"Failed to send disconnection message: {ex.Message}"); } if (Clients.Contains(client)) { Clients.Remove(client); } foreach (DispatcherBase dispatcher in Dispatchers) { dispatcher.Updated -= client.SendObject; } NotifyDispathers(); logger.Info($"{client.SocketConnection.ConnectionInfo.Id} Connection closed for client {client.Identity}"); }
public void DisconnectClient(ClientConnection client) { client.Disconnect(); }