mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Stop returning errors that should be ignored while closing stdin
Signed-off-by: Darren Stahl <darst@microsoft.com>
This commit is contained in:
parent
383a2f046b
commit
ae35c0f70e
1 changed files with 2 additions and 5 deletions
|
@ -38,17 +38,14 @@ func createStdInCloser(pipe io.WriteCloser, process hcsshim.Process) io.WriteClo
|
|||
return err
|
||||
}
|
||||
|
||||
// We do not need to lock container ID here, even though
|
||||
// we are calling into hcsshim. This is safe, because the
|
||||
// only place that closes this process handle is this method.
|
||||
err := process.CloseStdin()
|
||||
if err != nil && !hcsshim.IsNotExist(err) {
|
||||
if err != nil && !hcsshim.IsNotExist(err) && !hcsshim.IsAlreadyClosed(err) {
|
||||
// This error will occur if the compute system is currently shutting down
|
||||
if perr, ok := err.(*hcsshim.ProcessError); ok && perr.Err != hcsshim.ErrVmcomputeOperationInvalidState {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return err
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue