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

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