Subject: | calling shutdown dies instead of exiting cleanly |
Date: | Sun, 01 Jul 2007 23:55:23 +0200 |
To: | bug-POE-Component-Client-HTTP [...] rt.cpan.org |
From: | Anonymous <mix [...] awxcnx.de> |
when i call shutdown (via a a sigint) it dies as often as
it succeeds. when it dies, i see one of these two messages:
deallocate() requires a request ID at /opt/local/lib/perl5/site_perl/5.8.8/POE/Component/Client/HTTP.pm line 916
Can't use an undefined value as an ARRAY reference at /opt/local/lib/perl5/site_perl/5.8.8/POE/Component/Client/Keepalive.pm line 440.
here is my shutdown event:
sub shutdown {
my ($kernel, $heap) = @_[ KERNEL, HEAP ];
$kernel->alarm_remove_all;
$kernel->post( ua => 'shutdown' );
# used to stop creating requests
$heap->{is_shutdown} = 1;
$kernel->post( dbi => commit => { event => '' } );
$kernel->post( dbi => 'shutdown' );
$kernel->select_read( $heap->{aio_fh} );
$kernel->sig_handled;
}