mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Add additional comments for vague lines
Signed-off-by: Michael Crosby <michael@docker.com>
This commit is contained in:
parent
6ae05936e1
commit
be22d7ac2d
1 changed files with 4 additions and 1 deletions
|
@ -164,12 +164,15 @@ func (m *containerMonitor) Start() error {
|
||||||
utils.Errorf("Error running container: %s", err)
|
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)
|
m.container.State.SetStopped(exitStatus)
|
||||||
|
|
||||||
|
// pass if we exited successfully
|
||||||
m.reset(err == nil && exitStatus == 0)
|
m.reset(err == nil && exitStatus == 0)
|
||||||
|
|
||||||
if m.shouldRestart(exitStatus) {
|
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)
|
time.Sleep(time.Duration(m.timeIncrement) * time.Millisecond)
|
||||||
|
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Add table
Reference in a new issue