dial-stdio: fix goroutine leakage

Fix #1736

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
This commit is contained in:
Akihiro Suda 2019-03-22 20:22:00 +09:00
parent f40f9c240a
commit f8d4c443ba
1 changed files with 2 additions and 2 deletions

View File

@ -46,8 +46,8 @@ func runDialStdio(dockerCli command.Cli) error {
return errors.New("the raw stream connection does not implement halfCloser") return errors.New("the raw stream connection does not implement halfCloser")
} }
stdin2conn := make(chan error) stdin2conn := make(chan error, 1)
conn2stdout := make(chan error) conn2stdout := make(chan error, 1)
go func() { go func() {
stdin2conn <- copier(connHalfCloser, &halfReadCloserWrapper{os.Stdin}, "stdin to stream") stdin2conn <- copier(connHalfCloser, &halfReadCloserWrapper{os.Stdin}, "stdin to stream")
}() }()