Fix HTTP2 support

This commit is contained in:
Harm Less 2021-12-11 18:05:17 +08:00 committed by GitHub
parent 369b42cbc6
commit b0fd08c670
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,6 +68,7 @@ func NewClient(opt *Options) *Client {
KeepAlive: 30 * time.Second, KeepAlive: 30 * time.Second,
DualStack: true, DualStack: true,
}).DialContext, }).DialContext,
ForceAttemptHTTP2: true,
MaxIdleConns: 0, // Default: 100 MaxIdleConns: 0, // Default: 100
MaxIdleConnsPerHost: 1000, // Default: 2 MaxIdleConnsPerHost: 1000, // Default: 2
IdleConnTimeout: 90 * time.Second, IdleConnTimeout: 90 * time.Second,