aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/app/process.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-10-05 03:58:52 +0900
committerOphestra <cat@gensokyo.uk>2025-10-05 03:59:52 +0900
commit80ad2e4e2384adc84dc70ee15138c0ea4f9b6784 (patch)
treedd8096a8de40bc24816e6518c8100d7d8775044f /internal/app/process.go
parent92b83bd599adf085c1a2a9c73eeb6b6dc1eee6e4 (diff)
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 <cat@gensokyo.uk>
Diffstat (limited to 'internal/app/process.go')
-rw-r--r--internal/app/process.go4
1 files changed, 2 insertions, 2 deletions
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: