Only try to reboot if we can ping. The open can hang a long time, and so a rebooting camera can then be told to reboot again, causing an endless cycle
parent
19bd85c9f2
commit
566ce16230
|
@ -132,7 +132,7 @@ while (!$zm_terminate) {
|
|||
Debug("Monitor $monitor->{Id} $monitor->{Name}, startup time $now - $startup_time $startup_elapsed <? $Config{ZM_WATCH_MAX_DELAY}");
|
||||
if ($monitor->ControlId()) {
|
||||
my $control = $monitor->Control();
|
||||
if ($control and $control->CanReboot() and $control->open()) {
|
||||
if ($control and $control->CanReboot() and $control->ping() and $control->open()) {
|
||||
$control->reboot();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue