From e5d29d4c3b9f372f82cbbb4e49b4e4fa31b9fa5f Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Thu, 23 Mar 2017 16:14:31 +0100 Subject: [PATCH] Small speed optimization. Check parent_detection from the outer loop. --- pandora_server/lib/PandoraFMS/Recon/Base.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_server/lib/PandoraFMS/Recon/Base.pm b/pandora_server/lib/PandoraFMS/Recon/Base.pm index e35540400d..f06ff3c381 100644 --- a/pandora_server/lib/PandoraFMS/Recon/Base.pm +++ b/pandora_server/lib/PandoraFMS/Recon/Base.pm @@ -1154,7 +1154,7 @@ sub scan($) { # Get a list of found hosts. my @hosts = @{$self->get_hosts()}; - if (scalar(@hosts) > 0) { + if (scalar(@hosts) > 0 && $self->{'parent_detection'} == 1) { # Delete previous connections. $self->call('delete_connections');