From 762895ff2a745e81e4c61f5221bcaddd2a1331a7 Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Mon, 13 Sep 2021 13:46:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=81=A5=E5=BA=B7=E6=A3=80=E6=9F=A5=E6=94=AF?= =?UTF-8?q?=E6=8C=81IPv6=E5=9C=B0=E5=9D=80=E7=9A=84=E8=8A=82=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/tasks/health_check_executor.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/tasks/health_check_executor.go b/internal/tasks/health_check_executor.go index 40fb90df..f3dd1f37 100644 --- a/internal/tasks/health_check_executor.go +++ b/internal/tasks/health_check_executor.go @@ -8,6 +8,7 @@ import ( "github.com/TeaOSLab/EdgeAPI/internal/errors" "github.com/TeaOSLab/EdgeAPI/internal/remotelogs" "github.com/TeaOSLab/EdgeAPI/internal/utils" + "github.com/TeaOSLab/EdgeCommon/pkg/configutils" "github.com/TeaOSLab/EdgeCommon/pkg/nodeconfigs" "github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs" "github.com/iwind/TeaGo/lists" @@ -185,11 +186,11 @@ func (this *HealthCheckExecutor) checkNode(healthCheckConfig *serverconfigs.Heal if err != nil { return nil, err } - conn, err := net.Dial(network, result.NodeAddr+":"+port) + conn, err := net.Dial(network, configutils.QuoteIP(result.NodeAddr)+":"+port) if err == nil { return conn, nil } - return net.DialTimeout(network, result.NodeAddr+":"+port, timeout) + return net.DialTimeout(network, configutils.QuoteIP(result.NodeAddr)+":"+port, timeout) }, MaxIdleConns: 1, MaxIdleConnsPerHost: 1,