The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.
CHANGES 1727
META.yml 44
Makefile.PL 44
README 11
README.mkdn 11
dist.ini 22
lib/POE/Component/Client/Keepalive.pm 519
lib/POE/Component/Connection/Keepalive.pm 54
8 files changed (This is a version diff) 3962
@@ -1,4 +1,31 @@
 ================================
+2011-07-30 04:54:36 -0400 v0_268
+================================
+
+  commit c53106ea6c8aa079eb251a4dc9707d23492f7e1e
+  Author: Rocco Caputo <rcaputo@cpan.org>
+  Date:   Sat Jul 30 04:54:36 2011 -0400
+  
+    Bump revision and dependency for release.
+
+  commit b791c0bdc8cd29f3969b5cffcebfa2f5ab057eb5
+  Author: Rocco Caputo <rcaputo@cpan.org>
+  Date:   Sat Jul 30 04:30:12 2011 -0400
+  
+    Multi-line NAME sections corrupt the VERSION/NAME section ordering.
+    I'm not sure why or which plugin is doing it, but making the NAME
+    test one line is a serviceable workaround.
+
+    Resolves rt.cpan.org ticket 69235, reported by Debian developer
+    Gregor Hermann.
+
+  commit 65eb566f05d5f3fadebd20d41c4fc928bc596e2c
+  Author: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
+  Date:   Mon Jul 25 22:54:59 2011 +0100
+  
+    Address [rt.cpan.org #69519] "resolve() on shutdown resolver" errors 
+
+================================
 2011-05-03 22:41:56 -0400 v0_267
 ================================
 
@@ -117,23 +144,6 @@
     tests, which work better with IPv4 than with willy-nilly address
     families. 
 
-================================
-2010-06-10 13:39:43 -0400 v0_263
-================================
-
-  commit e0a13446e43c567de6287276229c1c10cd27b395
-  Author: Rocco Caputo <rcaputo@cpan.org>
-  Date:   Thu Jun 10 13:39:43 2010 -0400
-  
-    Bump up the version for release.
-
-  commit 2d844f15579e9cc6f47309449d228a3eeb250316
-  Author: Rocco Caputo <rcaputo@cpan.org>
-  Date:   Thu Jun 10 13:37:27 2010 -0400
-  
-    Fix the case insensitivy of ETIMEDOUT check, per gustavderdrache's
-    report in freenode #perl. 
-
 ===================================
 End of changes in the last 365 days
 ===================================
@@ -4,9 +4,9 @@ author:
   - 'Rocco Caputo <rcaputo@cpan.org>'
 build_requires: {}
 configure_requires:
-  ExtUtils::MakeMaker: 6.31
+  ExtUtils::MakeMaker: 6.30
 dynamic_config: 0
-generated_by: 'Dist::Zilla version 4.200004, CPAN::Meta::Converter version 2.102400'
+generated_by: 'Dist::Zilla version 4.200012, CPAN::Meta::Converter version 2.102400'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -15,7 +15,7 @@ name: POE-Component-Client-Keepalive
 requires:
   Net::IP: 1.25
   POE: 1.311
-  POE::Component::Resolver: 0.912
+  POE::Component::Resolver: 0.913
 resources:
   repository: git://github.com/rcaputo/poe-component-client-keepalive.git
-version: 0.267
+version: 0.268
@@ -4,7 +4,7 @@ use warnings;
 
 
 
-use ExtUtils::MakeMaker 6.31;
+use ExtUtils::MakeMaker 6.30;
 
 
 
@@ -13,7 +13,7 @@ my %WriteMakefileArgs = (
   'AUTHOR' => 'Rocco Caputo <rcaputo@cpan.org>',
   'BUILD_REQUIRES' => {},
   'CONFIGURE_REQUIRES' => {
-    'ExtUtils::MakeMaker' => '6.31'
+    'ExtUtils::MakeMaker' => '6.30'
   },
   'DISTNAME' => 'POE-Component-Client-Keepalive',
   'EXE_FILES' => [],
@@ -22,9 +22,9 @@ my %WriteMakefileArgs = (
   'PREREQ_PM' => {
     'Net::IP' => '1.25',
     'POE' => '1.311',
-    'POE::Component::Resolver' => '0.912'
+    'POE::Component::Resolver' => '0.913'
   },
-  'VERSION' => '0.267',
+  'VERSION' => '0.268',
   'test' => {
     'TESTS' => 't/*.t'
   }
@@ -2,7 +2,7 @@ NAME
     POE::Component::Client::Keepalive - manage connections, with keep-alive
 
 VERSION
-    version 0.267
+    version 0.268
 
 SYNOPSIS
       use warnings;
@@ -4,7 +4,7 @@ POE::Component::Client::Keepalive - manage connections, with keep-alive
 
 # VERSION
 
-version 0.267
+version 0.268
 
 # SYNOPSIS
 
@@ -1,5 +1,5 @@
 name              = POE-Component-Client-Keepalive
-version           = 0.267
+version           = 0.268
 author            = Rocco Caputo <rcaputo@cpan.org>
 license           = Perl_5
 copyright_holder  = Rocco Caputo
@@ -7,7 +7,7 @@ copyright_holder  = Rocco Caputo
 [Prereqs]
 Net::IP                   = 1.25
 POE                       = 1.311
-POE::Component::Resolver  = 0.912
+POE::Component::Resolver  = 0.913
 
 [Repository]
 git_remote = gh
@@ -1,6 +1,6 @@
 package POE::Component::Client::Keepalive;
 BEGIN {
-  $POE::Component::Client::Keepalive::VERSION = '0.267';
+  $POE::Component::Client::Keepalive::VERSION = '0.268';
 }
 
 use warnings;
@@ -44,6 +44,7 @@ sub _free_req_id {
 }
 
 my $default_resolver;
+my $instances = 0;
 
 # The connection manager uses a number of data structures, most of
 # them arrays.  These constants define offsets into those arrays, and
@@ -149,8 +150,11 @@ sub new {
     $bind_address,      # SF_BIND_ADDR
   ], $class;
 
+  $default_resolver = $resolver
+    if $resolver && eval { $resolver->isa('POE::Component::Resolver') };
+
   $self->[SF_RESOLVER] = (
-    $resolver || ($default_resolver ||= POE::Component::Resolver->new())
+    $default_resolver ||= POE::Component::Resolver->new()
   );
 
   POE::Session->create(
@@ -185,6 +189,7 @@ sub new {
 
 sub _ka_initialize {
   my ($object, $kernel, $heap) = @_[OBJECT, KERNEL, HEAP];
+  $instances++;
   $heap->{resolve} = { };
   $kernel->alias_set("$object");
 }
@@ -806,6 +811,8 @@ sub _ka_shutdown {
 
   return if $self->[SF_SHUTDOWN];
 
+  $instances--;
+
   # Clean out the request queue.
   foreach my $request (@{$self->[SF_QUEUE]}) {
     $self->_shutdown_request($kernel, $request);
@@ -835,9 +842,16 @@ sub _ka_shutdown {
 
   # Shut down the resolver.
   DEBUG and warn "SHT: Shutting down resolver";
-	$self->[SF_RESOLVER]->shutdown();
+  if ( $self->[SF_RESOLVER] != $default_resolver ) {
+	  $self->[SF_RESOLVER]->shutdown();
+  }
   $self->[SF_RESOLVER] = undef;
 
+  if ( $default_resolver and !$instances ) {
+    $default_resolver->shutdown();
+    $default_resolver = undef;
+  }
+
   # Finish keepalive's shutdown.
   $kernel->alias_remove("$self");
   $self->[SF_SHUTDOWN] = 1;
@@ -1122,7 +1136,7 @@ POE::Component::Client::Keepalive - manage connections, with keep-alive
 
 =head1 VERSION
 
-version 0.267
+version 0.268
 
 =head1 SYNOPSIS
 
@@ -1406,4 +1420,4 @@ http://github.com/rcaputo/poe-component-client-keepalive
 
 http://search.cpan.org/dist/POE-Component-Client-Keepalive/
 
-=cut
\ No newline at end of file
+=cut
@@ -4,7 +4,7 @@
 
 package POE::Component::Connection::Keepalive;
 BEGIN {
-  $POE::Component::Connection::Keepalive::VERSION = '0.267';
+  $POE::Component::Connection::Keepalive::VERSION = '0.268';
 }
 
 use warnings;
@@ -99,12 +99,11 @@ __END__
 
 =head1 NAME
 
+POE::Component::Connection::Keepalive - a wheel wrapper around a kept-alive socket
 
 =head1 VERSION
 
-version 0.267
-POE::Component::Connection::Keepalive - a wheel wrapper around a
-kept-alive socket
+version 0.268
 
 =head1 SYNOPSIS
 
@@ -210,4 +209,4 @@ Rocco Caputo <rcaputo@cpan.org>
 
 Special thanks to Rob Bloodgood.
 
-=cut
\ No newline at end of file
+=cut