1
0
mirror of https://github.com/rancher/os.git synced 2025-09-05 08:42:38 +00:00

Make loading service retries configurable

This commit is contained in:
niusmallnan
2019-12-19 15:03:05 +08:00
committed by niusmallnan
parent 88c5b5ef14
commit 29aaadd88c
4 changed files with 5 additions and 1 deletions

View File

@@ -108,8 +108,9 @@ func LoadFromNetwork(location string) ([]byte, error) {
}
SetProxyEnvironmentVariables()
cfg := config.LoadConfig()
client := httpRetry.NewHTTPClient()
client.MaxRetries = 3
client.MaxRetries = cfg.Rancher.HTTPLoadRetries
log.Debugf("start trying LoadFromNetwork(%s)", location)
bytes, err := client.GetRetry(location)
if err != nil {