Unverified Commit f4fc9737 authored by Gavin Brown's avatar Gavin Brown
Browse files

check if we have an empty set of IPs. suppress exceptions

parent 567dfe3f
......@@ -181,11 +181,16 @@ sub main_loop {
#
my @ips = resolve($ns, $CONF->{'AddressFamily'});
foreach my $proto (@PROTOCOLS) {
#
# spawn thread
#
$threads->{$ns}->{$proto} = threads->create(\&time_query, ($CONF->{'AddressFamily'}, $proto, @ips));
if (scalar(@ips) < 1) {
debug('unable to resolve %s', uc($ns));
} else {
foreach my $proto (@PROTOCOLS) {
#
# spawn thread
#
$threads->{$ns}->{$proto} = threads->create(\&time_query, ($CONF->{'AddressFamily'}, $proto, @ips));
}
}
}
......@@ -218,11 +223,6 @@ sub main_loop {
#
sleep($CONF->{'Loop'}-$dt) if ($dt < $CONF->{'Loop'});
};
if ($@) {
chomp($@);
debug($@);
}
}
#
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment