Merge pull request #36670 from stevvooe/use-context-error

daemon: use context error rather than inventing new one
This commit is contained in:
Sebastiaan van Stijn 2018-03-22 20:45:20 +01:00 committed by GitHub
commit 766d9edf39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -270,7 +270,7 @@ func (d *Daemon) ContainerExecStart(ctx context.Context, name string, stdin io.R
case <-attachErr:
// TERM signal worked
}
return fmt.Errorf("context cancelled")
return ctx.Err()
case err := <-attachErr:
if err != nil {
if _, ok := err.(term.EscapeError); !ok {