From 13d7889cc40f662757c7e76959d837a2168f08d1 Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Tue, 15 Dec 2020 09:57:09 +0100 Subject: [PATCH] Applied fix --- pandora_server/lib/PandoraFMS/Tools.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pandora_server/lib/PandoraFMS/Tools.pm b/pandora_server/lib/PandoraFMS/Tools.pm index ab905f08ee..37d2bfe666 100755 --- a/pandora_server/lib/PandoraFMS/Tools.pm +++ b/pandora_server/lib/PandoraFMS/Tools.pm @@ -1556,6 +1556,10 @@ sub ping ($$) { 1 ); + # Set default values if config is not defined. + $timeout = 4 if !defined($timeout); + $retries = 4 if !defined($retries); + # Windows if (($^O eq "MSWin32") || ($^O eq "MSWin32-x64") || ($^O eq "cygwin")){ $timeout *= 1000; # Convert the timeout to milliseconds.