mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 14:07:14 +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()
|
r.lastErrorTimeLock.Lock()
|
||||||
defer r.lastErrorTimeLock.Unlock()
|
defer r.lastErrorTimeLock.Unlock()
|
||||||
d := time.Since(r.lastErrorTime)
|
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
|
// 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)
|
time.Sleep(r.minPeriod - d)
|
||||||
}
|
}
|
||||||
r.lastErrorTime = time.Now()
|
r.lastErrorTime = time.Now()
|
||||||
|
Loading…
Reference in New Issue
Block a user