From fc3d5cab4ac98ba5f9950e99208e0d5adaa80dcc Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Wed, 15 May 2024 08:05:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=81=A5=E5=BA=B7=E6=A3=80=E6=9F=A5=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E8=BF=87=E7=A8=8B=E4=B8=AD=E4=B8=8D=E9=87=8D=E7=94=A8?= =?UTF-8?q?=E8=BF=9E=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/tasks/health_check_executor.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/tasks/health_check_executor.go b/internal/tasks/health_check_executor.go index aaae4a0f..648ec21b 100644 --- a/internal/tasks/health_check_executor.go +++ b/internal/tasks/health_check_executor.go @@ -272,6 +272,7 @@ func (this *HealthCheckExecutor) runNodeOnce(healthCheckConfig *serverconfigs.He if err != nil { return err } + req.Close = true if len(healthCheckConfig.UserAgent) > 0 { req.Header.Set("User-Agent", healthCheckConfig.UserAgent) } else { @@ -302,9 +303,9 @@ func (this *HealthCheckExecutor) runNodeOnce(healthCheckConfig *serverconfigs.He } return net.DialTimeout(network, configutils.QuoteIP(result.NodeAddr)+":"+port, timeout) }, - MaxIdleConns: 1, - MaxIdleConnsPerHost: 1, - MaxConnsPerHost: 1, + MaxIdleConns: 3, + MaxIdleConnsPerHost: 3, + MaxConnsPerHost: 3, IdleConnTimeout: 10 * time.Second, ExpectContinueTimeout: 1 * time.Second, TLSHandshakeTimeout: 0,