From e963917d8751b75c78e6e3648b93f692f3293250 Mon Sep 17 00:00:00 2001 From: Mmx Date: Mon, 14 Oct 2024 12:01:39 +0800 Subject: [PATCH] fix: timeout settings of http client --- internal/pkg/http_client/http_default.go | 1 + internal/pkg/http_client/http_linux.go | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/pkg/http_client/http_default.go b/internal/pkg/http_client/http_default.go index 43b99a0..3114128 100644 --- a/internal/pkg/http_client/http_default.go +++ b/internal/pkg/http_client/http_default.go @@ -22,6 +22,7 @@ func CreateClientFromEth(eth *tools.Eth) *http.Client { Timeout: config.Timeout, LocalAddr: addr, }).DialContext, + TLSHandshakeTimeout: config.Timeout, TLSClientConfig: &tls.Config{ InsecureSkipVerify: config.Settings.Basic.SkipCertVerify, }, diff --git a/internal/pkg/http_client/http_linux.go b/internal/pkg/http_client/http_linux.go index 92148d7..894d517 100644 --- a/internal/pkg/http_client/http_linux.go +++ b/internal/pkg/http_client/http_linux.go @@ -35,7 +35,6 @@ func CreateClientFromEth(eth *tools.Eth) *http.Client { Transport: &http.Transport{ DialContext: dialer.DialContext, TLSHandshakeTimeout: config.Timeout, - IdleConnTimeout: config.Timeout, TLSClientConfig: &tls.Config{InsecureSkipVerify: config.Settings.Basic.SkipCertVerify}, Proxy: http.ProxyFromEnvironment, },