From cfa9201f824050718a37e554315de228fe4c1526 Mon Sep 17 00:00:00 2001 From: yusing Date: Mon, 9 Jun 2025 22:20:49 +0800 Subject: [PATCH] fix(shutdown): change gracefulShutdown to call root.Finish directly instead of in a goroutine --- internal/task/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/task/utils.go b/internal/task/utils.go index 5b63fa77..9135e5f5 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 }