mirror of
https://github.com/kemko/nomad.git
synced 2026-01-07 19:05:42 +03:00
taskrunner: return error on waitCh
This commit is contained in:
committed by
Michael Schurter
parent
44cc52a0d4
commit
993e045ff9
@@ -33,8 +33,9 @@ func (tr *TaskRunner) Restart(ctx context.Context, event *structs.TaskEvent, fai
|
||||
// Drain the wait channel or wait for the request context to be canceled
|
||||
waitCh, err := handle.WaitCh(ctx)
|
||||
if err != nil {
|
||||
tr.logger.Error("failed to kill task. Resources may have been leaked", "error", err)
|
||||
return err
|
||||
}
|
||||
|
||||
<-waitCh
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user