diff --git a/daemon/execdriver/lxc/driver.go b/daemon/execdriver/lxc/driver.go index d787d8d873..0b98176213 100644 --- a/daemon/execdriver/lxc/driver.go +++ b/daemon/execdriver/lxc/driver.go @@ -268,18 +268,14 @@ func (d *driver) waitForStart(c *execdriver.Command, waitLock chan struct{}) (in } output, err = d.getInfo(c.ID) - if err != nil { - output, err = d.getInfo(c.ID) + if err == nil { + info, err := parseLxcInfo(string(output)) if err != nil { return -1, err } - } - info, err := parseLxcInfo(string(output)) - if err != nil { - return -1, err - } - if info.Running { - return info.Pid, nil + if info.Running { + return info.Pid, nil + } } time.Sleep(50 * time.Millisecond) }