瀏覽代碼

Merge pull request #4723 from vieux/fix_panic_monitor

fix panic in monitor
Guillaume J. Charmes 11 年之前
父節點
當前提交
dd040c9870
共有 1 個文件被更改,包括 1 次插入1 次删除
  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.