This commit is contained in:
eson 2023-08-21 19:07:02 +08:00
parent 880ffc2a58
commit fd2ca28876

View File

@ -168,14 +168,14 @@ func NewBackend(mux *http.ServeMux, httpAddress string, muxPaths ...string) *Bac
client := &http.Client{ client := &http.Client{
Transport: &http.Transport{ Transport: &http.Transport{
DialContext: (&net.Dialer{ DialContext: (&net.Dialer{
Timeout: 60 * time.Second, Timeout: 300 * time.Second,
KeepAlive: 60 * time.Second, KeepAlive: 60 * time.Second,
}).DialContext, }).DialContext,
ForceAttemptHTTP2: true, ForceAttemptHTTP2: true,
MaxIdleConns: 100, MaxIdleConns: 100,
MaxIdleConnsPerHost: 100, MaxIdleConnsPerHost: 100,
IdleConnTimeout: 90 * time.Second, IdleConnTimeout: 300 * time.Second,
TLSHandshakeTimeout: 10 * time.Second, TLSHandshakeTimeout: 300 * time.Second,
ExpectContinueTimeout: 1 * time.Second, ExpectContinueTimeout: 1 * time.Second,
}, },
} }