mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 12:15:52 +00:00
remove check d >= 0 since go 1.8 is no longer supported on master branch
This commit is contained in:
parent
a7d6340ad2
commit
93aa73e492
@ -128,9 +128,8 @@ func (r *rudimentaryErrorBackoff) OnError(error) {
|
||||
r.lastErrorTimeLock.Lock()
|
||||
defer r.lastErrorTimeLock.Unlock()
|
||||
d := time.Since(r.lastErrorTime)
|
||||
if d < r.minPeriod && d >= 0 {
|
||||
if d < r.minPeriod {
|
||||
// If the time moves backwards for any reason, do nothing
|
||||
// TODO: remove check "d >= 0" after go 1.8 is no longer supported
|
||||
time.Sleep(r.minPeriod - d)
|
||||
}
|
||||
r.lastErrorTime = time.Now()
|
||||
|
Loading…
Reference in New Issue
Block a user