1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-04 19:17:37 +08:00

optimize: increase http client timeout (#2315)

This commit is contained in:
achieve 2023-08-01 08:51:58 +08:00 committed by GitHub
parent a4c131e04a
commit aa3a5d28da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,7 +33,7 @@ var client = &http.Client{
TLSNextProto: map[string]func(authority string, c *tls.Conn) http.RoundTripper{}, TLSNextProto: map[string]func(authority string, c *tls.Conn) http.RoundTripper{},
MaxIdleConnsPerHost: 999, MaxIdleConnsPerHost: 999,
}, },
Timeout: time.Second * 5, Timeout: time.Second * 15,
} }
var clienth2 = &http.Client{ var clienth2 = &http.Client{
@ -47,7 +47,7 @@ var clienth2 = &http.Client{
ForceAttemptHTTP2: true, ForceAttemptHTTP2: true,
MaxIdleConnsPerHost: 999, MaxIdleConnsPerHost: 999,
}, },
Timeout: time.Second * 5, Timeout: time.Second * 15,
} }
// ErrOverSize 响应主体过大时返回此错误 // ErrOverSize 响应主体过大时返回此错误