diff --git a/src/opnsense/scripts/routes/gateway_watcher.php b/src/opnsense/scripts/routes/gateway_watcher.php index c5db7979d..82f069562 100755 --- a/src/opnsense/scripts/routes/gateway_watcher.php +++ b/src/opnsense/scripts/routes/gateway_watcher.php @@ -142,5 +142,5 @@ while (1) { configdp_run($action, [implode(',', $alarm_gateways)]); } - sleep($alarm ? $wait : $poll); + sleep(count($alarm_gateways) ? $wait : $poll); }