Explorar o código

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

daemon: use context error rather than inventing new one
Sebastiaan van Stijn %!s(int64=7) %!d(string=hai) anos
pai
achega
766d9edf39
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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 {