diff options
Diffstat (limited to 'internal/app/process.go')
| -rw-r--r-- | internal/app/process.go | 4 |
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: |
