Remove explicit setting of ExitCode
That will be set in defer anyway. Also there was race between setting ExitCode and inspect. Signed-off-by: Alexander Morozov <lk4d4@docker.com>
This commit is contained in:
parent
8dbaed1d96
commit
e7f6433109
|
|
@ -168,12 +168,10 @@ func (m *containerMonitor) Start() error {
|
||||||
// we need to check this before reentering the loop because the waitForNextRestart could have
|
// we need to check this before reentering the loop because the waitForNextRestart could have
|
||||||
// been terminated by a request from a user
|
// been terminated by a request from a user
|
||||||
if m.shouldStop {
|
if m.shouldStop {
|
||||||
m.container.ExitCode = exitStatus.ExitCode
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
m.container.ExitCode = exitStatus.ExitCode
|
|
||||||
if exitStatus.OOMKilled {
|
if exitStatus.OOMKilled {
|
||||||
m.container.LogEvent("oom")
|
m.container.LogEvent("oom")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue