Subject: | Guaranteed timeout may fail for https connections |
If trying this script (a https connection to a non-existing host) then
the timeout does not happen after 5 seconds, but after over three minutes:
#!/usr/bin/perl
use LWPx::ParanoidAgent;
my $ua = LWPx::ParanoidAgent->new;
$ua->timeout(5);
my $t0 = time;
$ua->get("https://www.example.com");
warn time - $t0;
__END__
$ perl /tmp/paranoid.pl
190 at /tmp/paranoid.pl line 9.
This is a problem of libwww-perl, see here:
http://rt.cpan.org/Public/Bug/Display.html?id=22839
But I wonder if there could be a solution within LWPx::ParanoidAgent,
say, using some hack with alarm(...) to guarantee the maximum timeout.
Regards,
Slaven