Skip Menu |

This queue is for tickets about the POE-Component-Server-SimpleHTTP CPAN distribution.

Report information
The Basics
Id: 42444
Status: new
Priority: 0/
Queue: POE-Component-Server-SimpleHTTP

People
Owner: Nobody in particular
Requestors: pravus [...] cpan.org
Cc:
AdminCc:

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



Subject: Graceful shutdown fails to stop component when no alias is specified
In performing some testing I noticed that I could not get an instance of PoCo-S-SimpleHTTP to properly shutdown unless I specified an alias in the constructor. When I looked at the code it appeared as though the graceful shutdown wasn't decrementing the refcount that is put in place at component startup. I've attached a patch that adds the necessary refcount decrement.
Subject: POE-Component-Server-SimpleHTTP-1.50-graceful.patch
diff -urP POE-Component-Server-SimpleHTTP-1.50.orig/lib/POE/Component/Server/SimpleHTTP.pm POE-Component-Server-SimpleHTTP-1.50/lib/POE/Component/Server/SimpleHTTP.pm --- POE-Component-Server-SimpleHTTP-1.50.orig/lib/POE/Component/Server/SimpleHTTP.pm 2008-12-17 04:40:10.000000000 -0600 +++ POE-Component-Server-SimpleHTTP-1.50/lib/POE/Component/Server/SimpleHTTP.pm 2009-01-15 13:34:44.000000000 -0600 @@ -379,7 +379,9 @@ # Alright, shutdown anyway # Delete our alias - $_[KERNEL]->alias_remove( $_[HEAP]->{'ALIAS'} ); + $_[KERNEL]->alias_remove( $_[HEAP]->{'ALIAS'} ) if $_[HEAP]->{'ALIAS'}; + $_[KERNEL]->refcount_decrement( $_[HEAP]->{'SESSION_ID'}, __PACKAGE__ ) + unless $_[HEAP]->{'ALIAS'}; # Debug stuff if ( DEBUG ) {