fix bug with undef vals in hosts struct

This commit is contained in:
Oliver Gorwits
2014-04-21 21:18:26 +00:00
parent 67a0e6ca22
commit 6eefcf648b

View File

@@ -103,11 +103,10 @@ addresses which resolved.
sub hostnames_resolve_async {
my $ips = shift;
my $resolver = AnyEvent::DNS->new();
my %HOSTS = ();
$HOSTS{$_} = [ map { [ format_address $_->[0] ] }
$HOSTS{$_} = [ map { [ $_ ? (format_address $_->[0]) : '' ] }
@{$AnyEvent::DNS::EtcHosts::HOSTS{$_}} ]
for keys %AnyEvent::DNS::EtcHosts::HOSTS;