diff --git a/components/engine/integration-cli/docker_utils.go b/components/engine/integration-cli/docker_utils.go index 6133f3727b..a123ca2dc4 100644 --- a/components/engine/integration-cli/docker_utils.go +++ b/components/engine/integration-cli/docker_utils.go @@ -90,14 +90,16 @@ func (d *Daemon) Start(arg ...string) error { return fmt.Errorf("Could not start daemon container: %v", err) } - d.wait = make(chan error) + wait := make(chan error) go func() { - d.wait <- d.cmd.Wait() + wait <- d.cmd.Wait() d.t.Log("exiting daemon") - close(d.wait) + close(wait) }() + d.wait = wait + tick := time.Tick(500 * time.Millisecond) // make sure daemon is ready to receive requests for {