Browse code

daemon: use context error rather than inventing new one

Signed-off-by: Stephen J Day <stephen.day@docker.com>

Stephen J Day authored on 2018/03/23 01:38:59
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 {