浏览代码

daemon: use context error rather than inventing new one

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Stephen J Day 7 年之前
父节点
当前提交
d84da75f01
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      daemon/exec.go

+ 1 - 1
daemon/exec.go

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