Ejemplo n.º 1
0
        public void Remove(ClientContext client)
        {
            //TODO: remove
            Logger.Debug($"Removing client {client.ConnectionId}");

            if (client.ConnectionId == null)
            {
                Logger.Warn("Tried to Remove ClientContext with null ConnectionId");
                return;
            }

            if (client.UserSessionId != null)
            {
                _userSessionManager.RemoveSession(client.UserSessionId.Value);
            }

            _clients.TryRemove(client.ConnectionId, out _);
        }