mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-16 17:22:22 +08:00
Fix incorrect use of sort.Slice
This commit is contained in:
parent
d08b82b71c
commit
08f4384579
|
@ -134,7 +134,7 @@ func getProxies(server *Server, router adapter.Router) func(w http.ResponseWrite
|
|||
defaultTag = allProxies[0]
|
||||
}
|
||||
|
||||
sort.Slice(allProxies, func(i, j int) bool {
|
||||
sort.SliceStable(allProxies, func(i, j int) bool {
|
||||
return allProxies[i] == defaultTag
|
||||
})
|
||||
|
||||
|
|
|
@ -233,7 +233,7 @@ func (g *URLTestGroup) Fallback(used adapter.Outbound) []adapter.Outbound {
|
|||
outbounds = append(outbounds, detour)
|
||||
}
|
||||
}
|
||||
sort.Slice(outbounds, func(i, j int) bool {
|
||||
sort.SliceStable(outbounds, func(i, j int) bool {
|
||||
oi := outbounds[i]
|
||||
oj := outbounds[j]
|
||||
hi := g.history.LoadURLTestHistory(RealTag(oi))
|
||||
|
|
Loading…
Reference in New Issue
Block a user