瀏覽代碼

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

daemon: use context error rather than inventing new one
Sebastiaan van Stijn 7 年之前
父節點
當前提交
766d9edf39
共有 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:
 			// TERM signal worked
 		}
-		return fmt.Errorf("context cancelled")
+		return ctx.Err()
 	case err := <-attachErr:
 		if err != nil {
 			if _, ok := err.(term.EscapeError); !ok {