mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fix die command when monitor returns
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
This commit is contained in:
parent
62c4563987
commit
80f128a6ea
1 changed files with 5 additions and 3 deletions
|
@ -1141,9 +1141,7 @@ func (container *Container) monitor(callback execdriver.StartCallback) error {
|
|||
}
|
||||
|
||||
if err != nil {
|
||||
if container.runtime != nil && container.runtime.srv != nil {
|
||||
container.runtime.srv.LogEvent("die", container.ID, container.runtime.repositories.ImageName(container.Image))
|
||||
}
|
||||
utils.Errorf("Error running container: %s", err)
|
||||
}
|
||||
|
||||
// Cleanup
|
||||
|
@ -1156,6 +1154,10 @@ func (container *Container) monitor(callback execdriver.StartCallback) error {
|
|||
|
||||
container.State.SetStopped(exitCode)
|
||||
|
||||
if container.runtime != nil && container.runtime.srv != nil {
|
||||
container.runtime.srv.LogEvent("die", container.ID, container.runtime.repositories.ImageName(container.Image))
|
||||
}
|
||||
|
||||
close(container.waitLock)
|
||||
|
||||
// FIXME: there is a race condition here which causes this to fail during the unit tests.
|
||||
|
|
Loading…
Reference in a new issue