Exemple #1
0
 public void Permit(IPAddress endpoint)
 {
     lock (_lock)
     {
         _healthyEndpoints.Add(endpoint);
         _ring.PermitNode(endpoint);
     }
 }
Exemple #2
0
        public void Permit(IPAddress endpoint)
        {
            var newHealthy = new HashSet <IPAddress>(_healthyEndpoints);

            newHealthy.Add(endpoint);
            _healthyEndpoints = newHealthy.ToArray();
            lock (_ring)
            {
                _ring.PermitNode(endpoint);
            }
        }