diff --git a/Echo.Process/Role.cs b/Echo.Process/Role.cs index 5b75689..c5be50d 100644 --- a/Echo.Process/Role.cs +++ b/Echo.Process/Role.cs @@ -189,8 +189,13 @@ public static ProcessName Current public static IEnumerable NodeIds(ProcessId leaf) => Nodes(leaf).Values.Map(node => ProcessId.Top[node.NodeName].Append(leaf.Skip(1))); - public static HashMap Nodes(ProcessId leaf, SystemName system = default(SystemName)) => - ClusterNodes24(system).Filter(node => node.Role == leaf.Take(1).Name); + public static HashMap Nodes(ProcessId leaf, SystemName system = default(SystemName)) + { + var nodes = ClusterNodes(system).Filter(node => node.Role == leaf.Take(1).Name); + return nodes.Count == 0 + ? ClusterNodes24(system).Filter(node => node.Role == leaf.Take(1).Name) + : nodes; + } static readonly ProcessId nextRoot; static readonly ProcessId prevRoot;