Merge pull request #22356 from allencloud/close-http-response-body-when-attaching
close http response body when attaching Upstream-commit: 28452ca78346cf8824ea71be35b4773f96405b1a Component: engine
This commit is contained in:
@@ -212,6 +212,8 @@ func (cli *DockerCli) CmdRun(args ...string) error {
|
||||
// keep the error and read detailed error message from hijacked connection later
|
||||
return errAttach
|
||||
}
|
||||
defer resp.Close()
|
||||
|
||||
ctx, cancelFun = context.WithCancel(context.Background())
|
||||
errCh = promise.Go(func() error {
|
||||
errHijack := cli.holdHijackedConnection(ctx, config.Tty, in, out, stderr, resp)
|
||||
|
||||
Reference in New Issue
Block a user