diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-10-10 04:50:07 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-10-10 05:11:32 +0900 |
| commit | 776650af01d56d1c38861420de7f4a077f0a61f8 (patch) | |
| tree | 04c4f7c5bf412de50b6cf13a240cb7c0fa77c5b5 /internal/app/outcome.go | |
| parent | 109aaee6593ac6e72d23b817e5b75292c2ed7bed (diff) | |
hst/config: negative WaitDelay bypasses default
This behaviour might be useful, so do not lock it out. This change also fixes an oversight where the unchecked value is used to determine ForwardCancel.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/app/outcome.go')
| -rw-r--r-- | internal/app/outcome.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/internal/app/outcome.go b/internal/app/outcome.go index 84a4bae3..0999ae91 100644 --- a/internal/app/outcome.go +++ b/internal/app/outcome.go @@ -81,7 +81,9 @@ func (s *outcomeState) populateEarly(k syscallDispatcher, msg message.Msg) { s.Shim = &shimParams{PrivPID: os.Getpid(), Verbose: msg.IsVerbose()} // enforce bounds and default early - if s.Container.WaitDelay <= 0 { + if s.Container.WaitDelay < 0 { + s.Shim.WaitDelay = 0 + } else if s.Container.WaitDelay == 0 { s.Shim.WaitDelay = hst.WaitDelayDefault } else if s.Container.WaitDelay > hst.WaitDelayMax { s.Shim.WaitDelay = hst.WaitDelayMax |
