Jeff Cours <[EMAIL PROTECTED]> writes:

> It's been a while since I had to make that particular change, but
> reconstructing it from my notes it looks like setting Timeout in
> IO::Socket::INET->new() causes new() to call $self->blocking(). In our
> installation, which should be a reasonably standard 5.00503,
> IO::Handle::blocking() is in the perldoc but doesn't seem to be
> implemented, which caused the surrounding eval{} to fail, so the socket
> didn't open, which caused the web query to fail with a broken pipe
> error.

There is no blocking call at all in the IO::Socket that comes with
5.00503.  In IO-1.20 that comes with perl-5.6.1 we find this sequence:

   $ grep blocking Socket.pm
    my $blocking;
    $blocking = $sock->blocking(0) if $timeout;
    $sock->blocking(1) if $blocking;

I can't see that the patch makes any difference.  If timeout is undef
or 0, then blocking will not be invoked at all.

> The patch I sent to you allows me to get around this problem by setting
> timeout to 0 or not defining it. In this case, it changes
> LWP::Protocol::http::new() to honor the code's request to not timeout by
> not signaling the timeout to the socket.

The patch will not go into LWP-latest until you can point out which
versions of IO::Socket::INET actually needs it.

Regards,
Gisle

Reply via email to