mirror of https://github.com/docker/docs.git
Remove useless goroutine
This commit is contained in:
parent
86205540d8
commit
e2d034e488
|
@ -1270,7 +1270,6 @@ func (cli *DockerCli) CmdRun(args ...string) error {
|
||||||
if !config.AttachStdout && !config.AttachStderr {
|
if !config.AttachStdout && !config.AttachStderr {
|
||||||
fmt.Println(out.ID)
|
fmt.Println(out.ID)
|
||||||
} else {
|
} else {
|
||||||
chErrors := make(chan error)
|
|
||||||
if config.Tty {
|
if config.Tty {
|
||||||
cli.monitorTtySize(out.ID)
|
cli.monitorTtySize(out.ID)
|
||||||
}
|
}
|
||||||
|
@ -1288,10 +1287,7 @@ func (cli *DockerCli) CmdRun(args ...string) error {
|
||||||
if config.AttachStderr {
|
if config.AttachStderr {
|
||||||
v.Set("stderr", "1")
|
v.Set("stderr", "1")
|
||||||
}
|
}
|
||||||
go func() {
|
if err := cli.hijack("POST", "/containers/"+out.ID+"/attach?"+v.Encode(), config.Tty, os.Stdin, os.Stdout); err != nil {
|
||||||
chErrors <- cli.hijack("POST", "/containers/"+out.ID+"/attach?"+v.Encode(), config.Tty, os.Stdin, os.Stdout)
|
|
||||||
}()
|
|
||||||
if err := <-chErrors; err != nil {
|
|
||||||
utils.Debugf("Error hijack: %s", err)
|
utils.Debugf("Error hijack: %s", err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue