Subject: | Bug in POE::Component::Client::TCP |
Date: | Fri, 5 May 2006 15:02:34 -0600 |
To: | rcaputo [...] pobox.com |
From: | Eric Waters <ewaters [...] uarc.com> |
Rocco,
I'd like to submit the following fix for POE/Component/Server/TCP.pm:
Add "my $sub_instantiate_filters = sub {" onto line 112, after "
if (defined $client_input) {".
Add "return @filters;\n}" onto line 186 after the filters have
been instantiated.
Replace "@filters," on line 264 with a call to this anon
subroutine "$sub_instantiate_filters->(),"
This will fix a problem I've run into with the code, wherein using
filters which expect to be instantiated for each client connecting
(i.e., POE::Filter::XML which maintains a running buffer of partial
XML data) don't work right. As far as I can tell, new instances of
POE::Filter::*'s are supposed to be created upon each client, and not
at the time of the Component (or Session) being created.
Eric
--
Email signed with GnuPG key id 0x7FE92A42
http://www.vegcrew.net/~ewaters/pubkey.asc