Skip to content

Commit

Permalink
Merge branch 'master' of github.com:ZoneMinder/zmeventnotification
Browse files Browse the repository at this point in the history
  • Loading branch information
connortechnology committed Apr 12, 2022
2 parents ec7e8c6 + d55f790 commit 792518a
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions zmeventnotification.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1306,12 +1306,14 @@ ()
my $hr;
my $data = do { local $/ = undef; <$fh> };
close($fh);
eval { $hr = decode_json($data); };
if ($@) {
printError("Could not parse token file $token_file for token counts: $!");
} else {
%tokens_data = %$hr;
$update_tokens = 1;
if ($data) { # Could be empty
eval { $hr = decode_json($data); };
if ($@) {
printError("Could not parse token file $token_file for token counts: $!");
} else {
%tokens_data = %$hr;
$update_tokens = 1;
}
}
}

Expand Down

0 comments on commit 792518a

Please sign in to comment.