X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FMsg.pm;h=cf15ff76a8ce2242762d01248339d0ea1c61e22e;hb=403e6bac61ed5d509aeda5b49557481ac88bc08c;hp=ef43b0bc24618b6033aa52520a009defdae1318e;hpb=86b2012061c37c8f5235bd6488a3a83dff3ea5f1;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($!);