Browse code

Fix error reporting on executor wait

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>

Tonis Tiigi authored on 2016/06/23 09:49:46
Showing 1 changed files
... ...
@@ -152,9 +152,6 @@ func (r *controller) Wait(pctx context.Context) error {
152 152
 	defer cancel()
153 153
 
154 154
 	err := r.adapter.wait(ctx)
155
-	if err != nil {
156
-		return err
157
-	}
158 155
 	if ctx.Err() != nil {
159 156
 		return ctx.Err()
160 157
 	}
... ...
@@ -166,6 +163,7 @@ func (r *controller) Wait(pctx context.Context) error {
166 166
 		if ec, ok := err.(exec.ExitCoder); ok {
167 167
 			ee.code = ec.ExitCode()
168 168
 		}
169
+		return ee
169 170
 	}
170 171
 	return nil
171 172
 }