Implement periodic timeout checking for instances

This commit is contained in:
2025-08-17 21:10:48 +02:00
parent c734bcae4a
commit 5e3a28398d
3 changed files with 39 additions and 2 deletions

View File

@@ -15,8 +15,7 @@ func (i *Process) ShouldTimeout() bool {
i.mu.RLock()
defer i.mu.RUnlock()
// If idle timeout is not set, no timeout
if i.options.IdleTimeout == nil || *i.options.IdleTimeout <= 0 {
if !i.Running || i.options.IdleTimeout == nil || *i.options.IdleTimeout <= 0 {
return false
}