mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 13:47:15 +08:00
feat: api请求添加自动重试
This commit is contained in:
@@ -34,6 +34,7 @@ func NewAPI(panelVersion, locale string, url ...string) *API {
|
||||
}
|
||||
|
||||
client := resty.New()
|
||||
client.SetRetryCount(3)
|
||||
client.SetTimeout(10 * time.Second)
|
||||
client.SetBaseURL(url[0])
|
||||
client.SetHeader(
|
||||
|
||||
Reference in New Issue
Block a user