mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-05-04 19:17:37 +08:00
fix: add timeout setting for default http client
This commit is contained in:
parent
4ad7da7a9a
commit
174d99f94b
@ -12,6 +12,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/tidwall/gjson"
|
||||
@ -32,6 +33,7 @@ var client = &http.Client{
|
||||
MaxIdleConns: 0,
|
||||
MaxIdleConnsPerHost: 999,
|
||||
},
|
||||
Timeout: time.Second * 5,
|
||||
}
|
||||
|
||||
// ErrOverSize 响应主体过大时返回此错误
|
||||
|
Loading…
x
Reference in New Issue
Block a user