develooper Front page | perl.libwww | Postings from June 2014

Re: LWP hangs forever with get

Thread Previous
From:
Jesper Persson
Date:
June 2, 2014 15:56
Subject:
Re: LWP hangs forever with get
Message ID:
CA+uC3V1tXg+x0M8Ahq8pRsEjZesOAsE+zEm=uTPdT61OTOxf-Q@mail.gmail.com
Hi Steffen,

thank you for taking your time to fix/workaround this.

I have just updated IO::Socket::SSL to version 1.992 and I can verify that
the "hang" no longer happens.

Best Regards
Jesper


On 1 June 2014 23:55, Steffen Ullrich <coyote.frank@gmx.net> wrote:

>
>
>> READ:
>>              {
>>                  die "read timeout" unless $self->can_read;
>>                  my $n = $self->sysread($_, 1024, length);
>>                  unless (defined $n) {
>>                      redo READ if $!{EINTR} || $!{EAGAIN};
>>
>
> The server makes a connection reset if you try to access
> https://www.butler.edu/boa/default.aspx. On unix this will set $! to
> ECONNRESET, and for unknown reason this will not set $! on Windows with
> Strawberry perl5.18.2 , but only returns "SSL read error" from the SSL
> layer.
>
> Thus $! will stay at EINTR from the previous error and it will loop
> forever.
>
> IO::Socket::SSL 1.992 (just released) works around this problem by
> resetting $! before doing I/O. This way $! will no longer stay at $!, but
> will be undef and thus the loop will exit, albeit with no specific error.
> The real fix would be of course to set $! to ECONNRESET in the underlying
> IO::Socket layer if the TCP connection was reset.
>
> Steffen
>
>
>

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About