Resolve connection reset by peer regression
Signed-off-by: Jim Minter <jminter@redhat.com>
(cherry picked from commit dc0ee98805
)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
This commit is contained in:
parent
fbd3d64212
commit
9c05b1049f
1 changed files with 6 additions and 2 deletions
|
@ -36,7 +36,7 @@ func (daemon *Daemon) ContainerAttach(prefixOrName string, c *backend.ContainerA
|
|||
}
|
||||
|
||||
cfg := stream.AttachConfig{
|
||||
UseStdin: c.UseStdin && container.Config.OpenStdin,
|
||||
UseStdin: c.UseStdin,
|
||||
UseStdout: c.UseStdout,
|
||||
UseStderr: c.UseStderr,
|
||||
TTY: container.Config.Tty,
|
||||
|
@ -79,7 +79,7 @@ func (daemon *Daemon) ContainerAttachRaw(prefixOrName string, stdin io.ReadClose
|
|||
return err
|
||||
}
|
||||
cfg := stream.AttachConfig{
|
||||
UseStdin: stdin != nil && container.Config.OpenStdin,
|
||||
UseStdin: stdin != nil,
|
||||
UseStdout: stdout != nil,
|
||||
UseStderr: stderr != nil,
|
||||
TTY: container.Config.Tty,
|
||||
|
@ -147,6 +147,10 @@ func (daemon *Daemon) containerAttach(c *container.Container, cfg *stream.Attach
|
|||
cfg.Stdin = r
|
||||
}
|
||||
|
||||
if !c.Config.OpenStdin {
|
||||
cfg.Stdin = nil
|
||||
}
|
||||
|
||||
waitChan := make(chan struct{})
|
||||
if c.Config.StdinOnce && !c.Config.Tty {
|
||||
defer func() {
|
||||
|
|
Loading…
Reference in a new issue