diff --git a/internal/init/main.go b/internal/init/main.go index e79618b..b70aebc 100644 --- a/internal/init/main.go +++ b/internal/init/main.go @@ -145,11 +145,12 @@ func doInit(fd uintptr) { default: r = 255 } + + go func() { + time.Sleep(residualProcessTimeout) + close(timeout) + }() } - go func() { - time.Sleep(residualProcessTimeout) - close(timeout) - }() case <-done: os.Exit(r) case <-timeout: