system: keep polling if watcher cannot load a class

This happened two times now...

[09-Oct-2023 19:25:44 Europe/Berlin] PHP Fatal error:  Uncaught Error: Class "OPNsense\Base\ModelException" not found in /usr/local/opnsense/mvc/app/models/OPNsense/Base/BaseModel.php:314
Stack trace:
  thrown in /usr/local/opnsense/mvc/app/models/OPNsense/Base/BaseModel.php on line 314
This commit is contained in:
Franco Fichtner 2023-10-18 14:21:53 +02:00
parent 3778fee6d1
commit 16ce982fa6

View File

@ -57,7 +57,13 @@ sleep($wait);
while (1) {
pcntl_signal_dispatch();
$status = dpinger_status();
try {
$status = dpinger_status();
} catch (Exception $e) {
sleep($poll);
continue;
}
$alarm = false;
/* clear known gateways in first step to flush unknown in second step */