mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Ignore ErrClosedPipe for stdin in Container.Attach.
But pass `err` in the error channel anyway; don't ignore it anymore.
This commit is contained in:
parent
e661473bcd
commit
b9eb5e04ae
1 changed files with 4 additions and 2 deletions
|
@ -470,11 +470,13 @@ func (container *Container) Attach(stdin io.ReadCloser, stdinCloser io.Closer, s
|
|||
} else {
|
||||
_, err = io.Copy(cStdin, stdin)
|
||||
}
|
||||
if err == io.ErrClosedPipe {
|
||||
err = nil
|
||||
}
|
||||
if err != nil {
|
||||
utils.Errorf("attach: stdin: %s", err)
|
||||
}
|
||||
// Discard error, expecting pipe error
|
||||
errors <- nil
|
||||
errors <- err
|
||||
}()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue