diff --git a/client/allocrunner/taskrunner/task_runner.go b/client/allocrunner/taskrunner/task_runner.go index 12f1abf26be7..4120b42ffad1 100644 --- a/client/allocrunner/taskrunner/task_runner.go +++ b/client/allocrunner/taskrunner/task_runner.go @@ -563,7 +563,9 @@ func (tr *TaskRunner) Run() { // Set the initial task state. tr.stateUpdater.TaskStateUpdated() - timer, stop := helper.NewSafeTimer(0) // timer duration calculated JIT + // start with a stopped timer; actual restart delay computed later + timer, stop := helper.NewSafeTimer(999 * time.Hour) + timer.Stop() defer stop() MAIN: