mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-29 17:52:32 +00:00
Respect VAULT_MAX_RETRIES from environment in DefaultConfig() (#10883)
This commit is contained in:
committed by
GitHub
parent
0e0e06fc8f
commit
77a5ca59e0
@@ -149,6 +149,8 @@ func DefaultConfig() *Config {
|
||||
Address: "https://127.0.0.1:8200",
|
||||
HttpClient: cleanhttp.DefaultPooledClient(),
|
||||
Timeout: time.Second * 60,
|
||||
MaxRetries: 2,
|
||||
Backoff: retryablehttp.LinearJitterBackoff,
|
||||
}
|
||||
|
||||
transport := config.HttpClient.Transport.(*http.Transport)
|
||||
@@ -178,9 +180,6 @@ func DefaultConfig() *Config {
|
||||
return http.ErrUseLastResponse
|
||||
}
|
||||
|
||||
config.Backoff = retryablehttp.LinearJitterBackoff
|
||||
config.MaxRetries = 2
|
||||
|
||||
return config
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user