Add additional comments for vague lines

Signed-off-by: Michael Crosby <michael@docker.com>
Upstream-commit: be22d7ac2db6396becd63ec2dd28b9731011c9b9
Component: engine
This commit is contained in:
Michael Crosby
2014-08-11 10:50:02 -07:00
parent 1f88a5f013
commit 6ce3708a40

View File

@ -164,12 +164,15 @@ func (m *containerMonitor) Start() error {
utils.Errorf("Error running container: %s", err)
}
// We still wait to set the state as stopped and ensure that the locks were released
// we still wait to set the state as stopped and ensure that the locks were released
m.container.State.SetStopped(exitStatus)
// pass if we exited successfully
m.reset(err == nil && exitStatus == 0)
if m.shouldRestart(exitStatus) {
// sleep with a small time increment between each restart to help avoid issues cased by quickly
// restarting the container because of some types of errors ( networking cut out, etc... )
time.Sleep(time.Duration(m.timeIncrement) * time.Millisecond)
continue