mirror of
https://github.com/yusing/godoxy.git
synced 2025-06-10 05:12:34 +02:00
fix(shutdown): change gracefulShutdown to call root.Finish directly instead of in a goroutine
This commit is contained in:
parent
b5328fe5e7
commit
cfa9201f82
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue