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