system: small refactor for clarity

This commit is contained in:
Franco Fichtner 2023-09-07 09:36:04 +02:00
parent 97b08eec0c
commit 31593b1e6f

View File

@ -141,14 +141,9 @@ while (1) {
}
}
/* react to alarm if backend action was given */
if ($alarm) {
if ($action != null) {
configd_run($action);
}
/* XXX this blacks out all alarms for the grace period after alarm */
sleep($wait);
} else {
sleep($poll);
if ($alarm && $action != null) {
configd_run($action);
}
sleep($alarm ? $wait : $poll);
}