fixed issu where if service dropped out then leastconnection would not pick it up again (#195)

This commit is contained in:
Tom Pallister
2018-01-10 08:12:22 +00:00
committed by GitHub
parent 6a20baeb97
commit 6992f9e113
3 changed files with 153 additions and 7 deletions

View File

@ -123,7 +123,7 @@ namespace Ocelot.LoadBalancer.LoadBalancers
foreach (var service in services)
{
var exists = _leases.FirstOrDefault(l => l.HostAndPort.ToString() == service.HostAndPort.ToString());
var exists = _leases.FirstOrDefault(l => l.HostAndPort.DownstreamHost == service.HostAndPort.DownstreamHost && l.HostAndPort.DownstreamPort == service.HostAndPort.DownstreamPort);
if (exists == null)
{