From 3f24bfaaf53b3bb12b6d0770a997673721f966aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Wed, 3 Aug 2022 20:54:08 +0800 Subject: [PATCH] =?UTF-8?q?HTTP=E8=AF=BB=E5=8F=96L2=E8=8A=82=E7=82=B9?= =?UTF-8?q?=E6=97=B6=E5=A2=9E=E5=8A=A0=E6=9C=80=E5=A4=A7=E8=BF=9E=E6=8E=A5?= =?UTF-8?q?=E6=95=B0=E3=80=81=E6=9C=80=E5=A4=A7=E7=A9=BA=E9=97=B2=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5=E6=95=B0=E3=80=81=E6=9C=80=E5=A4=A7=E7=A9=BA=E9=97=B2?= =?UTF-8?q?=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/nodes/http_client_pool.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/internal/nodes/http_client_pool.go b/internal/nodes/http_client_pool.go index b0c1d23..8034e82 100644 --- a/internal/nodes/http_client_pool.go +++ b/internal/nodes/http_client_pool.go @@ -54,6 +54,7 @@ func (this *HTTPClientPool) Client(req *HTTPRequest, } var key = origin.UniqueKey() + "@" + originAddr + var isLnRequest = origin.Id == 0 this.locker.RLock() client, found := this.clientsMap[key] @@ -101,6 +102,13 @@ func (this *HTTPClientPool) Client(req *HTTPRequest, idleConns = numberCPU * 8 } + // 可以判断为Ln节点请求 + if isLnRequest { + maxConnections *= 8 + idleConns *= 8 + idleTimeout *= 4 + } + // TLS通讯 var tlsConfig = &tls.Config{ InsecureSkipVerify: true,