2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 13:47:15 +08:00

feat: api请求添加自动重试

This commit is contained in:
2026-01-26 16:32:52 +08:00
parent 7c6c5f213d
commit 522c2386a1
2 changed files with 3 additions and 2 deletions

View File

@@ -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(