From 4abf669d09722c5a4f469488a0bc56ac1329ae0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Sat, 23 Jul 2022 10:28:32 +0800 Subject: [PATCH] Fix urltest log --- outbound/urltest.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/outbound/urltest.go b/outbound/urltest.go index d16748ab..b7f7923b 100644 --- a/outbound/urltest.go +++ b/outbound/urltest.go @@ -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,