Set instance status to Failed when restart conditions are not met

This commit is contained in:
2025-08-27 19:47:36 +02:00
parent 1443746add
commit b41ebdc604

View File

@@ -257,6 +257,7 @@ func (i *Process) handleRestart() {
// Validate restart conditions and get safe parameters // Validate restart conditions and get safe parameters
shouldRestart, maxRestarts, restartDelay := i.validateRestartConditions() shouldRestart, maxRestarts, restartDelay := i.validateRestartConditions()
if !shouldRestart { if !shouldRestart {
i.SetStatus(Failed)
i.mu.Unlock() i.mu.Unlock()
return return
} }