mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-03-15 04:17:38 -04:00
Take FPSReportInterval into account when determining if a monitor is dead. Fixes #3766
This commit is contained in:
@@ -288,10 +288,13 @@ for ($monitor_i = 0; $monitor_i < count($displayMonitors); $monitor_i += 1) {
|
||||
<?php
|
||||
$source_class = 'infoText';
|
||||
$source_class_reason = '';
|
||||
|
||||
# 1 minute + fps_report_interval should be plenty.
|
||||
$fps_report_seconds = 60+($monitor['FPSReportInterval'] * $monitor['CaptureFPS']);
|
||||
if ( (!$monitor['Status'] || ($monitor['Status'] == 'NotRunning')) && ($monitor['Type'] != 'WebSite')) {
|
||||
$source_class = 'errorText';
|
||||
$source_class_reason = translate('Not Running');
|
||||
} else if (!$monitor['UpdatedOn'] or (strtotime($monitor['UpdatedOn']) < time()-60)) {
|
||||
} else if (!$monitor['UpdatedOn'] or (strtotime($monitor['UpdatedOn']) < time()-$fps_report_seconds)) {
|
||||
$source_class = 'errorText';
|
||||
$source_class_reason = translate('Offline');
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user