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,