From 566ce16230003a5aff87aa029a8aa590dc92ab71 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 19 Nov 2024 10:27:59 -0500 Subject: [PATCH] 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 --- scripts/zmwatch.pl.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/zmwatch.pl.in b/scripts/zmwatch.pl.in index 2d37ff475c..75d6d85365 100644 --- a/scripts/zmwatch.pl.in +++ b/scripts/zmwatch.pl.in @@ -132,7 +132,7 @@ while (!$zm_terminate) { Debug("Monitor $monitor->{Id} $monitor->{Name}, startup time $now - $startup_time $startup_elapsed 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(); } }