handle warning due to not defined last_run

This commit is contained in:
Isaac Connor 2021-12-21 20:24:28 -05:00
parent 185dc4a50d
commit 2aacbf790a
1 changed files with 1 additions and 1 deletions

View File

@ -184,7 +184,7 @@ while (!$zm_terminate) {
foreach my $filter (@filters) {
last if $zm_terminate;
my $elapsed = ($now - $$filter{last_ran});
my $elapsed = ($now - ($$filter{last_ran} ? $$filter{last_ran} : 0));
if ($$filter{last_ran} and ($elapsed < $$filter{ExecuteInterval})) {
my $filter_delay = $$filter{ExecuteInterval} - ($now - $$filter{last_ran});
$delay = $filter_delay if $filter_delay < $delay;