mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-06-08 11:44:13 +08:00
Fix urltest outbound
This commit is contained in:
parent
4c9455b944
commit
afb4993445
@ -395,13 +395,17 @@ func (g *URLTestGroup) urlTest(ctx context.Context, force bool) (map[string]uint
|
|||||||
func (g *URLTestGroup) performUpdateCheck() {
|
func (g *URLTestGroup) performUpdateCheck() {
|
||||||
var updated bool
|
var updated bool
|
||||||
if outbound, exists := g.Select(N.NetworkTCP); outbound != nil && (g.selectedOutboundTCP == nil || (exists && outbound != g.selectedOutboundTCP)) {
|
if outbound, exists := g.Select(N.NetworkTCP); outbound != nil && (g.selectedOutboundTCP == nil || (exists && outbound != g.selectedOutboundTCP)) {
|
||||||
g.selectedOutboundTCP = outbound
|
if g.selectedOutboundTCP != nil {
|
||||||
updated = true
|
updated = true
|
||||||
}
|
}
|
||||||
|
g.selectedOutboundTCP = outbound
|
||||||
|
}
|
||||||
if outbound, exists := g.Select(N.NetworkUDP); outbound != nil && (g.selectedOutboundUDP == nil || (exists && outbound != g.selectedOutboundUDP)) {
|
if outbound, exists := g.Select(N.NetworkUDP); outbound != nil && (g.selectedOutboundUDP == nil || (exists && outbound != g.selectedOutboundUDP)) {
|
||||||
g.selectedOutboundUDP = outbound
|
if g.selectedOutboundUDP != nil {
|
||||||
updated = true
|
updated = true
|
||||||
}
|
}
|
||||||
|
g.selectedOutboundUDP = outbound
|
||||||
|
}
|
||||||
if updated {
|
if updated {
|
||||||
g.interruptGroup.Interrupt(g.interruptExternalConnections)
|
g.interruptGroup.Interrupt(g.interruptExternalConnections)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user