From 9bb7a0278dae3cb10c9c5e63c83593270e5711fc Mon Sep 17 00:00:00 2001 From: Jin-Hwan Jeong Date: Tue, 18 Aug 2015 09:03:12 +0900 Subject: [PATCH] this patch fixes "high cpu consumption without sleeping in housekeeping()" problem if system time has changed Signed-off-by: Jin-Hwan Jeong --- manager/container.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/manager/container.go b/manager/container.go index 0f9c7ac7..0dca1b95 100644 --- a/manager/container.go +++ b/manager/container.go @@ -416,6 +416,8 @@ func (c *containerData) housekeeping() { // Schedule the next housekeeping. Sleep until that time. if time.Now().Before(next) { time.Sleep(next.Sub(time.Now())) + } else { + next = time.Now() } lastHousekeeping = next }