Bläddra i källkod

Fix urltest outbound

世界 6 månader sedan
förälder
incheckning
afb4993445
1 ändrade filer med 6 tillägg och 2 borttagningar
  1. 6 2
      protocol/group/urltest.go

+ 6 - 2
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)