mirror of
https://github.com/hashicorp/vault.git
synced 2026-06-09 08:55:13 -04:00
Merge pull request #2995 from hashicorp/sethvargo/renewer_bug
Do not double-convert to seconds
This commit is contained in:
commit
4dd846657c
1 changed files with 2 additions and 2 deletions
|
|
@ -296,7 +296,7 @@ func (r *Renewer) sleepDuration(base time.Duration) time.Duration {
|
|||
sleep = sleep / 3.0
|
||||
|
||||
// Use a randomness so many clients do not hit Vault simultaneously.
|
||||
sleep = sleep * r.random.Float64()
|
||||
sleep = sleep * (r.random.Float64() + 1) / 2.0
|
||||
|
||||
return time.Duration(sleep) * time.Second
|
||||
return time.Duration(sleep)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue