Skip to content

Commit

Permalink
this patch fixes "high cpu consumption without sleeping in housekeepi…
Browse files Browse the repository at this point in the history
…ng()" problem if system time has changed

Signed-off-by: Jin-Hwan Jeong <[email protected]>
  • Loading branch information
jhjeong-kr committed Aug 18, 2015
1 parent 9db0c2e commit 9bb7a02
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions manager/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 9bb7a02

Please sign in to comment.