From f8d4c443baedb7b19886593a4654f5c85fc33c43 Mon Sep 17 00:00:00 2001 From: Akihiro Suda Date: Fri, 22 Mar 2019 20:22:00 +0900 Subject: [PATCH] dial-stdio: fix goroutine leakage Fix #1736 Signed-off-by: Akihiro Suda --- cli/command/system/dial_stdio.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/command/system/dial_stdio.go b/cli/command/system/dial_stdio.go index 017ed40ce3..2385c14567 100644 --- a/cli/command/system/dial_stdio.go +++ b/cli/command/system/dial_stdio.go @@ -46,8 +46,8 @@ func runDialStdio(dockerCli command.Cli) error { return errors.New("the raw stream connection does not implement halfCloser") } - stdin2conn := make(chan error) - conn2stdout := make(chan error) + stdin2conn := make(chan error, 1) + conn2stdout := make(chan error, 1) go func() { stdin2conn <- copier(connHalfCloser, &halfReadCloserWrapper{os.Stdin}, "stdin to stream") }()