Skip to content

Commit 696b6ef

Browse files
Re connect to db when we give up due to too many forks. Without it we crash because logging will try to write to db.
1 parent 13daa9b commit 696b6ef

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

zmeventnotification.pl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4076,6 +4076,7 @@ sub initSocketServer {
40764076

40774077
foreach (@newEvents) {
40784078
if (($parallel_hooks >= $max_parallel_hooks) && ($max_parallel_hooks != 0)) {
4079+
$dbh = zmDbConnect(1);
40794080
printError("There are $parallel_hooks hooks running as of now. This exceeds your set limit of max_parallel_hooks=$max_parallel_hooks. Ignoring this event. Either increase your max_parallel_hooks value, or, adjust your ZM motion sensitivity ");
40804081
return;
40814082
}

0 commit comments

Comments
 (0)