From 08bd01c8a73ee0a884d5e39482a1a5dc204c08ca Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Fri, 1 Oct 2021 16:45:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=81=A2=E5=A4=8D=E6=BA=90=E7=AB=99=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E8=BF=9E=E6=8E=A5=E6=95=B0=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/nodes/http_client_pool.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/nodes/http_client_pool.go b/internal/nodes/http_client_pool.go index 48d2a9e..3222262 100644 --- a/internal/nodes/http_client_pool.go +++ b/internal/nodes/http_client_pool.go @@ -72,6 +72,9 @@ func (this *HTTPClientPool) Client(req *http.Request, origin *serverconfigs.Orig if numberCPU < 8 { numberCPU = 8 } + if maxConnections <= 0 { + maxConnections = numberCPU * 8 + } if idleConns <= 0 { idleConns = numberCPU * 4