diff --git a/internal/task/utils.go b/internal/task/utils.go index 5b63fa7..9135e5f 100644 --- a/internal/task/utils.go +++ b/internal/task/utils.go @@ -85,7 +85,7 @@ func WaitExit(shutdownTimeout int) { // still running when the timeout was reached, and their current tree // of subtasks. func gracefulShutdown(timeout time.Duration) error { - go root.Finish(ErrProgramExiting) + root.Finish(ErrProgramExiting) if !root.waitFinish(timeout) { return context.DeadlineExceeded }