mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-25 18:11:28 +00:00
Fix urltest log
This commit is contained in:
parent
187de6c738
commit
4abf669d09
|
@ -183,6 +183,7 @@ func (g *URLTestGroup) checkOutbounds() {
|
|||
b, _ := batch.New(context.Background(), batch.WithConcurrencyNum[any](10))
|
||||
checked := make(map[string]bool)
|
||||
for _, detour := range g.outbounds {
|
||||
tag := detour.Tag()
|
||||
realTag := RealTag(detour)
|
||||
if checked[realTag] {
|
||||
continue
|
||||
|
@ -201,10 +202,10 @@ func (g *URLTestGroup) checkOutbounds() {
|
|||
defer cancel()
|
||||
t, err := urltest.URLTest(ctx, g.link, p)
|
||||
if err != nil {
|
||||
g.logger.Debug("outbound ", detour.Tag(), " unavailable: ", err)
|
||||
g.logger.Debug("outbound ", tag, " unavailable: ", err)
|
||||
g.router.URLTestHistoryStorage(true).DeleteURLTestHistory(realTag)
|
||||
} else {
|
||||
g.logger.Debug("outbound ", detour.Tag(), " available: ", t, "ms")
|
||||
g.logger.Debug("outbound ", tag, " available: ", t, "ms")
|
||||
g.router.URLTestHistoryStorage(true).StoreURLTestHistory(realTag, &urltest.History{
|
||||
Time: time.Now(),
|
||||
Delay: t,
|
||||
|
|
Loading…
Reference in a new issue