Explorar o código

Merge pull request #4723 from vieux/fix_panic_monitor

fix panic in monitor
Guillaume J. Charmes %!s(int64=11) %!d(string=hai) anos
pai
achega
dd040c9870
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      runtime/container.go

+ 1 - 1
runtime/container.go

@@ -797,7 +797,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.