Browse Source

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

daemon: use context error rather than inventing new one
Sebastiaan van Stijn 7 năm trước cách đây
mục cha
commit
766d9edf39
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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 {