Skip Menu |

This queue is for tickets about the IO-Socket-IP CPAN distribution.

Report information
The Basics
Id: 100947
Status: resolved
Priority: 0/
Queue: IO-Socket-IP

People
Owner: Nobody in particular
Requestors: alexander.bluhm [...] gmx.net
Cc: oleg [...] cpan.org
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.34
Fixed in: 0.35



Subject: restore the blocking mode after connecting
On OpenBSD the regression tests of p5-LWP-Protocol-https fail if p5-IO-Socket-IP 0.34 is installed. ===> Regression tests for p5-LWP-Protocol-https-6.06p0 PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/apache.t ....... skipped: Not online unexpected response: 500 Can't connect to 127.0.0.1:31047 Content-Type: text/plain Client-Date: Tue, 16 Dec 2014 12:50:40 GMT Client-Warning: Internal response Can't connect to 127.0.0.1:31047 Resource temporarily unavailable at /usr/local/libdata/perl5/site_perl/LWP/Protocol/http.pm line 49. # Looks like you planned 56 tests but ran 24. # Looks like your test exited with 35 just after 24. # creating cert for direct.ssl.access # SSL handshake failed: SSL accept attempt failed t/https_proxy.t .. Dubious, test returned 35 (wstat 8960, 0x2300) Failed 32/56 subtests Test Summary Report ------------------- t/https_proxy.t (Wstat: 8960 Tests: 24 Failed: 0) Non-zero exit status: 35 Parse errors: Bad plan. You planned 56 tests but ran 24. Files=2, Tests=24, 1 wallclock secs ( 0.02 usr 0.03 sys + 0.73 cusr 0.21 csys = 0.99 CPU) Result: FAIL Failed 1/2 test programs. 0/24 subtests failed. There is a bug in IO::Socket::IP 0.34, it does not restore the blocking mode of the client ssl socket. This results in the "Resource temporarily unavailable" error. The following patch fixes it. --- lib/IO/Socket/IP.pm.orig Wed Dec 3 01:06:55 2014 +++ lib/IO/Socket/IP.pm Tue Dec 16 01:19:47 2014 @@ -672,6 +672,7 @@ sub connect if( !$err ) { # All happy + $self->blocking( $was_blocking ); return 1; } elsif( not( $err == EINPROGRESS or $err == EWOULDBLOCK ) ) {
Thanks, fixed. Will be in next version. -- Paul Evans
Released -- Paul Evans