mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-05-05 03:23:49 +08:00
optimize: increase http client timeout (#2315)
This commit is contained in:
parent
a4c131e04a
commit
aa3a5d28da
@ -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 响应主体过大时返回此错误
|
||||||
|
Loading…
x
Reference in New Issue
Block a user