From 224f9b1c952b09d0f19f21e5ca9b4583e7eafb7e Mon Sep 17 00:00:00 2001 From: DHR60 Date: Sat, 4 Oct 2025 12:07:03 +0800 Subject: [PATCH] Remove unnecessary checks --- .../CoreConfig/Singbox/SingboxOutboundService.cs | 12 ------------ .../CoreConfig/V2ray/V2rayOutboundService.cs | 12 ------------ 2 files changed, 24 deletions(-) diff --git a/v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxOutboundService.cs b/v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxOutboundService.cs index 08005725..46c90b23 100644 --- a/v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxOutboundService.cs +++ b/v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxOutboundService.cs @@ -494,12 +494,6 @@ public partial class CoreConfigSingboxService if (node.ConfigType is EConfigType.PolicyGroup or EConfigType.ProxyChain) { - var hasCycle = ProfileGroupItemManager.HasCycle(node.IndexId); - if (hasCycle) - { - return -1; - } - var (childProfiles, profileGroupItem) = await ProfileGroupItemManager.GetChildProfileItems(node.IndexId); if (childProfiles.Count <= 0) { @@ -675,12 +669,6 @@ public partial class CoreConfigSingboxService continue; if (node.ConfigType is EConfigType.PolicyGroup or EConfigType.ProxyChain) { - var hasCycle = ProfileGroupItemManager.HasCycle(node.IndexId); - if (hasCycle) - { - return -1; - } - var (childProfiles, profileGroupItem) = await ProfileGroupItemManager.GetChildProfileItems(node.IndexId); if (childProfiles.Count <= 0) { diff --git a/v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayOutboundService.cs b/v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayOutboundService.cs index 4c3a5148..58e4a840 100644 --- a/v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayOutboundService.cs +++ b/v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayOutboundService.cs @@ -631,12 +631,6 @@ public partial class CoreConfigV2rayService if (node.ConfigType is EConfigType.PolicyGroup or EConfigType.ProxyChain) { - var hasCycle = ProfileGroupItemManager.HasCycle(node.IndexId); - if (hasCycle) - { - return -1; - } - var (childProfiles, _) = await ProfileGroupItemManager.GetChildProfileItems(node.IndexId); if (childProfiles.Count <= 0) { @@ -788,12 +782,6 @@ public partial class CoreConfigV2rayService continue; if (node.ConfigType is EConfigType.PolicyGroup or EConfigType.ProxyChain) { - var hasCycle = ProfileGroupItemManager.HasCycle(node.IndexId); - if (hasCycle) - { - return -1; - } - var (childProfiles, _) = await ProfileGroupItemManager.GetChildProfileItems(node.IndexId); if (childProfiles.Count <= 0) {