this patch fixes "high cpu consumption without sleeping in housekeeping()" problem if system time has changed
Signed-off-by: Jin-Hwan Jeong <jhjeong.kr@gmail.com>
This commit is contained in:
parent
9db0c2e26f
commit
9bb7a0278d
@ -416,6 +416,8 @@ func (c *containerData) housekeeping() {
|
|||||||
// Schedule the next housekeeping. Sleep until that time.
|
// Schedule the next housekeeping. Sleep until that time.
|
||||||
if time.Now().Before(next) {
|
if time.Now().Before(next) {
|
||||||
time.Sleep(next.Sub(time.Now()))
|
time.Sleep(next.Sub(time.Now()))
|
||||||
|
} else {
|
||||||
|
next = time.Now()
|
||||||
}
|
}
|
||||||
lastHousekeeping = next
|
lastHousekeeping = next
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user