Procházet zdrojové kódy

Fix error reporting on executor wait

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Tonis Tiigi před 9 roky
rodič
revize
c895a76f10
1 změnil soubory, kde provedl 1 přidání a 3 odebrání
  1. 1 3
      daemon/cluster/executor/container/controller.go

+ 1 - 3
daemon/cluster/executor/container/controller.go

@@ -152,9 +152,6 @@ func (r *controller) Wait(pctx context.Context) error {
 	defer cancel()
 
 	err := r.adapter.wait(ctx)
-	if err != nil {
-		return err
-	}
 	if ctx.Err() != nil {
 		return ctx.Err()
 	}
@@ -166,6 +163,7 @@ func (r *controller) Wait(pctx context.Context) error {
 		if ec, ok := err.(exec.ExitCoder); ok {
 			ee.code = ec.ExitCode()
 		}
+		return ee
 	}
 	return nil
 }