Andrew Daviel <[EMAIL PROTECTED]> writes:

> I have been having some trouble with some web robot code
> under RedHat 6.2 using libwww-perl-5.48 and
> perl-5.00503-12.
> 
> I found that if the destination address does not respond
> that the connect in IO::Socket.pm is not timing out
> properly.
> 
> e.g.
>   use IO::Socket ;
>   $sock = IO::Socket::INET->new(PeerAddr => '216.13.169.245',
>                        PeerPort => 'http(80)',
>                        Proto     => 'tcp',
>                        Timeout => 5) ;
> 
> 
> I changed "undef" to "close" on line 203 and it seems to fix the
> problem. I confess I don't really know what I'm doing ...
> 
> viz.       local($SIG{ALRM}) = $timeout ? sub { close $fh; }


Try to upgrade your IO modules (including IO::Socket) from CPAN.

  http://search.cpan.org/search?dist=IO

Regards,
Gisle

Reply via email to