From afb499344564558dcb9612f0324628c35b949ec6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Wed, 16 Apr 2025 18:48:03 +0800 Subject: [PATCH] Fix urltest outbound --- protocol/group/urltest.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/protocol/group/urltest.go b/protocol/group/urltest.go index e52ec906..c1a5c597 100644 --- a/protocol/group/urltest.go +++ b/protocol/group/urltest.go @@ -395,12 +395,16 @@ func (g *URLTestGroup) urlTest(ctx context.Context, force bool) (map[string]uint func (g *URLTestGroup) performUpdateCheck() { var updated bool if outbound, exists := g.Select(N.NetworkTCP); outbound != nil && (g.selectedOutboundTCP == nil || (exists && outbound != g.selectedOutboundTCP)) { + if g.selectedOutboundTCP != nil { + updated = true + } g.selectedOutboundTCP = outbound - updated = true } if outbound, exists := g.Select(N.NetworkUDP); outbound != nil && (g.selectedOutboundUDP == nil || (exists && outbound != g.selectedOutboundUDP)) { + if g.selectedOutboundUDP != nil { + updated = true + } g.selectedOutboundUDP = outbound - updated = true } if updated { g.interruptGroup.Interrupt(g.interruptExternalConnections)