fix panic in monitor
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux) Upstream-commit: 1dfc44073399aadb226c1b4c1909fb15c033d44a Component: engine
This commit is contained in:
@ -785,7 +785,7 @@ func (container *Container) monitor(callback execdriver.StartCallback) error {
|
||||
utils.Errorf("Error running container: %s", err)
|
||||
}
|
||||
|
||||
if container.runtime.srv.IsRunning() {
|
||||
if container.runtime != nil && container.runtime.srv != nil && container.runtime.srv.IsRunning() {
|
||||
container.State.SetStopped(exitCode)
|
||||
|
||||
// FIXME: there is a race condition here which causes this to fail during the unit tests.
|
||||
|
||||
Reference in New Issue
Block a user