Merge pull request #82266 from m3ngyang/time-since
replace time.Now().Sub with time.Since Kubernetes-commit: 52626339b118901cc2f674b76b6920969241e389
This commit is contained in:
commit
00e84af51c
|
@ -135,7 +135,7 @@ func (h *kmsPluginProbe) Check() error {
|
||||||
h.l.Lock()
|
h.l.Lock()
|
||||||
defer h.l.Unlock()
|
defer h.l.Unlock()
|
||||||
|
|
||||||
if (time.Now().Sub(h.lastResponse.received)) < kmsPluginHealthzTTL {
|
if (time.Since(h.lastResponse.received)) < kmsPluginHealthzTTL {
|
||||||
return h.lastResponse.err
|
return h.lastResponse.err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue