From f2f4bcffc194bb49f3a69202f8620b74764343d9 Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Tue, 20 Apr 2021 11:38:05 -0500 Subject: [PATCH] cleaned up Reachability --- src/core/Akka.Cluster/Reachability.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/core/Akka.Cluster/Reachability.cs b/src/core/Akka.Cluster/Reachability.cs index f34ded79b06..5143f82c343 100644 --- a/src/core/Akka.Cluster/Reachability.cs +++ b/src/core/Akka.Cluster/Reachability.cs @@ -55,7 +55,6 @@ public enum ReachabilityStatus public static readonly Reachability Empty = new Reachability(ImmutableList.Create(), ImmutableDictionary.Create()); - //TODO: Serialization should ignore private readonly Lazy _cache; /// @@ -80,11 +79,6 @@ public Reachability(ImmutableList records, ImmutableDictionary public ImmutableDictionary Versions { get; } - /* - * def isReachable(observer: UniqueAddress, subject: UniqueAddress): Boolean = - status(observer, subject) == Reachable - */ - /// /// TBD /// @@ -223,6 +217,9 @@ public Reachability Merge(IImmutableSet allowed, Reachability oth var rows1 = ObserverRows(observer); var rows2 = other.ObserverRows(observer); + if (rows1 == null && rows2 == null) + continue; + if (rows1 != null && rows2 != null) { var rows = observerVersion1 > observerVersion2 ? rows1 : rows2;