X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FMsg.pm;h=cf15ff76a8ce2242762d01248339d0ea1c61e22e;hb=refs%2Ftags%2FR_1_50;hp=ef43b0bc24618b6033aa52520a009defdae1318e;hpb=dbf7523a9b228dbdf1d03109afde351b8b194fab;p=spider.git diff --git a/perl/Msg.pm b/perl/Msg.pm index ef43b0bc..cf15ff76 100644 --- a/perl/Msg.pm +++ b/perl/Msg.pm @@ -212,7 +212,10 @@ sub connect { blocking($sock, 0); $conn->{blocking} = 0; + # does the host resolve? my $ip = gethostbyname($to_host); + return undef unless $ip; + # my $r = $sock->connect($to_port, $ip); my $r = connect($sock, pack_sockaddr_in($to_port, $ip)); return undef unless $r || _err_will_block($!);