Skip Menu |
 

This queue is for tickets about the POE-Component-Client-Keepalive CPAN distribution.

Report information
The Basics
Id: 77333
Status: open
Priority: 0/
Queue: POE-Component-Client-Keepalive

People
Owner: Nobody in particular
Requestors: kozunov [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.271
Fixed in: (no value)



Subject: resolve() on shutdown resolver
Download (untitled) / with headers
text/plain 226b
I catch exception "resolve() on shutdown resolver" when run my test. If I add param ConnectionManager => POE::Component::Client::Keepalive->new(resolver => POE::Component::Resolver->new(idle_timeout => 1),) test will pass.
Subject: for_cpan4.t
Download for_cpan4.t
text/x-perl 2.2k
#!/usr/bin/perl use utf8; use strict; use warnings; use Data::Dumper; use POE 1.350; use POE::Component::Client::HTTP 0.946; use POE::Component::Client::Keepalive 0.271; use HTTP::Request::Common qw(GET HEAD); use HTTP::Cookies; use Test::More tests => 3; use Scalar::Util qw(weaken); my @domains = ('yandex.com', 'google.com'); check(); @domains = ('gmail.com'); check(); sub check { POE::Component::Client::HTTP->spawn( Alias => 'ua', FollowRedirects => 3, Timeout => 3, Agent => '', Streaming => 0, CookieJar => HTTP::Cookies->new(), ); for (1..2) { POE::Session->create( inline_states => { _start => sub { my $kernel = $_[KERNEL]; $kernel->yield('next_domain'); }, _stop => sub {}, response => \&response, next_domain => \&next_domain, }, ); } POE::Kernel->run(); } exit; sub response { my ($kernel, $request_packet, $response_packet) = @_[KERNEL, ARG0, ARG1]; my $http_request = $request_packet->[0]; my $tag = $request_packet->[1]; my $http_response = $response_packet->[0]; is($http_response->code, 200, $tag->{domain}); $kernel->yield('next_domain'); } sub next_domain { my $kernel = $_[KERNEL]; if (@domains) { my $domain = shift @domains; my $header = [TE => 'chunked,identity', Connection => "close"]; my $url = "http://$domain/"; my $request = HTTP::Request->new( 'GET', $url, $header); $kernel->post( "ua" => "request", "response", $request, {domain=>$domain}); } }
Download (untitled) / with headers
text/plain 305b
On Mon May 21 12:56:19 2012, sergei wrote: Show quoted text
> I catch exception "resolve() on shutdown resolver" when run my test.
The test passes without making any changes. Perhaps this is fixed in another commit? I'll follow up again after the next release. You can try it again to verify whether it's still broken.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.