Browse code

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

daemon: use context error rather than inventing new one

Sebastiaan van Stijn authored on 2018/03/23 04:45:20
Showing 1 changed files
... ...
@@ -270,7 +270,7 @@ func (d *Daemon) ContainerExecStart(ctx context.Context, name string, stdin io.R
270 270
 		case <-attachErr:
271 271
 			// TERM signal worked
272 272
 		}
273
-		return fmt.Errorf("context cancelled")
273
+		return ctx.Err()
274 274
 	case err := <-attachErr:
275 275
 		if err != nil {
276 276
 			if _, ok := err.(term.EscapeError); !ok {