dial-stdio: Close the connection

This was leaking the fd.

Signed-off-by: Ian Campbell <ijc@docker.com>
(cherry picked from commit 186e7456ac)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 75e9075591
Component: cli
This commit is contained in:
Ian Campbell
2019-03-12 14:52:22 +00:00
committed by Sebastiaan van Stijn
parent c2cf227965
commit 9d70293b5b

View File

@ -34,6 +34,7 @@ func runDialStdio(dockerCli command.Cli) error {
if err != nil {
return errors.Wrap(err, "failed to open the raw stream connection")
}
defer conn.Close()
var connHalfCloser halfCloser
switch t := conn.(type) {