Fix issue #2: nil pointer exception in handleWait()
This commit is contained in:
parent
a23d84064e
commit
0e85f4ab18
@ -529,17 +529,15 @@ func (d *Driver) handleWait(ctx context.Context, handle *taskHandle, ch chan *dr
|
|||||||
exitStatusCh, err := handle.task.Wait(ctxWithTimeout)
|
exitStatusCh, err := handle.task.Wait(ctxWithTimeout)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
result = &drivers.ExitResult{
|
result = &drivers.ExitResult{
|
||||||
Err: fmt.Errorf("executor: error waiting on process: %v", err),
|
ExitCode: 255,
|
||||||
|
Err: fmt.Errorf("executor: error waiting on process: %v", err),
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
status := <-exitStatusCh
|
status := <-exitStatusCh
|
||||||
code, _, err := status.Result()
|
code, _, err := status.Result()
|
||||||
if err != nil {
|
|
||||||
d.logger.Error(err.Error())
|
|
||||||
return
|
|
||||||
}
|
|
||||||
result = &drivers.ExitResult{
|
result = &drivers.ExitResult{
|
||||||
ExitCode: int(code),
|
ExitCode: int(code),
|
||||||
|
Err: err,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user