Fix logic on error reporting of failure to connect to db
This commit is contained in:
parent
7ef9824736
commit
a32b77510d
|
@ -115,12 +115,12 @@ while (1) {
|
||||||
$Config{ZM_TELEMETRY_LAST_UPLOAD} = $now;
|
$Config{ZM_TELEMETRY_LAST_UPLOAD} = $now;
|
||||||
}
|
}
|
||||||
zmDbDisconnect();
|
zmDbDisconnect();
|
||||||
|
} else {
|
||||||
|
Error('Failed to open database. Sleeping.');
|
||||||
|
}
|
||||||
} elsif (-t STDIN) {
|
} elsif (-t STDIN) {
|
||||||
print "ZoneMinder Telemetry Agent sleeping for $interval seconds because ($now-$lastCheck=$since_last_check > $interval\n";
|
print "ZoneMinder Telemetry Agent sleeping for $interval seconds because ($now-$lastCheck=$since_last_check > $interval\n";
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
Error("Failed to opem database. Sleeping.");
|
|
||||||
}
|
|
||||||
$lastCheck = $now;
|
$lastCheck = $now;
|
||||||
sleep($interval);
|
sleep($interval);
|
||||||
} # end while
|
} # end while
|
||||||
|
|
Loading…
Reference in New Issue