Remove useless goroutine

This commit is contained in:
Guillaume J. Charmes 2013-06-18 10:10:03 -07:00
parent 3a0ffbc772
commit 3dc93e390a

View file

@ -1058,7 +1058,6 @@ func (cli *DockerCli) CmdAttach(args ...string) error {
return err
}
chErrors := make(chan error)
if container.Config.Tty {
cli.monitorTtySize(cmd.Arg(0))
}
@ -1069,11 +1068,7 @@ func (cli *DockerCli) CmdAttach(args ...string) error {
v.Set("stdout", "1")
v.Set("stderr", "1")
go func() {
chErrors <- cli.hijack("POST", "/containers/"+cmd.Arg(0)+"/attach?"+v.Encode(), container.Config.Tty, os.Stdin, os.Stdout)
}()
if err := <-chErrors; err != nil {
if err := cli.hijack("POST", "/containers/"+cmd.Arg(0)+"/attach?"+v.Encode(), container.Config.Tty, os.Stdin, os.Stdout); err != nil {
return err
}
return nil