diff --git a/client/allocrunner/taskrunner/task_runner.go b/client/allocrunner/taskrunner/task_runner.go index a801b15fa..25a06bddd 100644 --- a/client/allocrunner/taskrunner/task_runner.go +++ b/client/allocrunner/taskrunner/task_runner.go @@ -457,7 +457,7 @@ func (tr *TaskRunner) shouldRestart() (bool, time.Duration) { case structs.TaskRestarting: tr.logger.Info("restarting task", "reason", reason, "delay", when) tr.UpdateState(structs.TaskStatePending, structs.NewTaskEvent(structs.TaskRestarting).SetRestartDelay(when).SetRestartReason(reason)) - return true, 0 + return true, when default: tr.logger.Error("restart tracker returned unknown state", "state", state) return true, when