Small speed optimization. Check parent_detection from the outer loop.

This commit is contained in:
Ramon Novoa 2017-03-23 16:14:31 +01:00
parent 895ec34a4f
commit e5d29d4c3b
1 changed files with 1 additions and 1 deletions

View File

@ -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');