mirror of
https://github.com/2dust/v2rayN.git
synced 2025-10-13 20:09:12 +00:00
Avoid self-reference
This commit is contained in:
parent
901f8101f0
commit
ca80e1e831
1 changed files with 6 additions and 4 deletions
|
@ -219,16 +219,18 @@ public partial class CoreConfigSingboxService
|
||||||
}
|
}
|
||||||
// remove custom nodes
|
// remove custom nodes
|
||||||
// remove group nodes for proxy chain
|
// remove group nodes for proxy chain
|
||||||
|
// avoid self-reference
|
||||||
var childProfiles = (await Task.WhenAll(
|
var childProfiles = (await Task.WhenAll(
|
||||||
Utils.String2List(profileGroupItem.ChildItems)
|
Utils.String2List(profileGroupItem.ChildItems)
|
||||||
.Where(p => !p.IsNullOrEmpty())
|
.Where(p => !p.IsNullOrEmpty())
|
||||||
.Select(AppManager.Instance.GetProfileItem)
|
.Select(AppManager.Instance.GetProfileItem)
|
||||||
))
|
))
|
||||||
.Where(p =>
|
.Where(p =>
|
||||||
p != null &&
|
p != null
|
||||||
p.IsValid() &&
|
&& p.IsValid()
|
||||||
p.ConfigType != EConfigType.Custom &&
|
&& p.ConfigType != EConfigType.Custom
|
||||||
(node.ConfigType == EConfigType.PolicyGroup || p.ConfigType < EConfigType.Group)
|
&& (node.ConfigType == EConfigType.PolicyGroup || p.ConfigType < EConfigType.Group)
|
||||||
|
&& p.IndexId != node.IndexId
|
||||||
)
|
)
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue