From 80ad2e4e2384adc84dc70ee15138c0ea4f9b6784 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sun, 5 Oct 2025 03:58:52 +0900 Subject: internal/app: do not offset base value This value is applied to the shim, it is incorrect to offset the base value as well. Signed-off-by: Ophestra --- internal/app/process.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/app/process.go') diff --git a/internal/app/process.go b/internal/app/process.go index 41fe4bd8..63f424f6 100644 --- a/internal/app/process.go +++ b/internal/app/process.go @@ -19,7 +19,7 @@ import ( "hakurei.app/system" ) -// duration to wait for shim to exit, after container WaitDelay has elapsed. +// Duration to wait for shim to exit on top of container WaitDelay. const shimWaitTimeout = 5 * time.Second // mainState holds persistent state bound to outcome.main. @@ -81,7 +81,7 @@ func (ms mainState) beforeExit(isFault bool) { waitDone := make(chan struct{}) // this ties waitDone to ctx with the additional compensated timeout duration - go func() { <-ms.k.ctx.Done(); time.Sleep(ms.waitDelay); close(waitDone) }() + go func() { <-ms.k.ctx.Done(); time.Sleep(ms.waitDelay + shimWaitTimeout); close(waitDone) }() select { case err := <-ms.cmdWait: -- cgit v1.3.1