mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
Merge pull request #61087 from lcfang/test0313
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. remove check "d >= 0" since go 1.8 is no longer supported on master branch **What this PR does / why we need it**: remove check "d >= 0" since go 1.8 is no longer supported on master branch **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes # **Special notes for your reviewer**: **Release note**: ```release-note NONE ```
This commit is contained in:
commit
8c1e171eec
@ -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