Skip to content

Commit

Permalink
Merge pull request #140 from spudwebb/fixlistener
Browse files Browse the repository at this point in the history
Fix ResolverListener so that ServiceLost is called only after N successive failed pings
  • Loading branch information
Oren Novotny committed Aug 15, 2019
2 parents e2246a1 + 058888b commit 0af235b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Zeroconf/ZeroConfResolver.Listener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,9 @@ void OnResolved(IReadOnlyList<IZeroconfHost> hosts)
{
ServiceFound?.Invoke(this, host);
newHosts.Add(keyValue);
if (toRemove.ContainsKey(keyValue)) toRemove.Remove(keyValue);
}
if (toRemove.ContainsKey(keyValue))
toRemove.Remove(keyValue);
}
}

Expand Down

0 comments on commit 0af235b

Please sign in to comment.