Skip Menu |

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

Report information
The Basics
Id: 19625
Status: resolved
Priority: 0/
Queue: POE-Component-Client-HTTP

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

Bug Information
Severity: (no value)
Broken in: 0.74
Fixed in: (no value)



Subject: bug in _finish_request
On FreeBSD new Client::HTTP complaining on any request: Can't call method "wheel" on an undefined value. I investigated the problem and found that _finish_request is called from poco_weeble_io_error handler (in turn poco_weeble_io_error is called when eof is reached). The poco_weeble_io_error handler, removes request from heap. my $request = delete $heap->{request}->{$request_id}; But later _finish_request, tries to get it from heap in the same way: my $request = delete $heap->{request}->{$request_id}; My fix is simple: _finish_request already having Component::HTTP::Request as paraeter, so let just not to shadow our parameter and just delete request from heap.
Subject: finish_request_fix.patch
Index: lib/POE/Component/Client/HTTP.pm =================================================================== --- lib/POE/Component/Client/HTTP.pm (revision 259) +++ lib/POE/Component/Client/HTTP.pm (working copy) @@ -723,7 +723,7 @@ # Virtually identical to _remove_request. # TODO - Make a common sub to handle both cases? DEBUG and warn "I/O: removing request $request_id"; - my $request = delete $heap->{request}->{$request_id}; + $request = delete $heap->{request}->{$request_id}; if (my $wheel = $request->wheel) { delete $heap->{wheel_to_request}->{$wheel->ID}; }
Please disregard my patch. There was a type. This attachment has correct patch.
Index: lib/POE/Component/Client/HTTP.pm =================================================================== --- lib/POE/Component/Client/HTTP.pm (revision 259) +++ lib/POE/Component/Client/HTTP.pm (working copy) @@ -723,7 +723,7 @@ # Virtually identical to _remove_request. # TODO - Make a common sub to handle both cases? DEBUG and warn "I/O: removing request $request_id"; - my $request = delete $heap->{request}->{$request_id}; + delete $heap->{request}->{$request_id}; if (my $wheel = $request->wheel) { delete $heap->{wheel_to_request}->{$wheel->ID}; }
I'm sorry. It was my fault (I'm using my own connection manager, and this error happended only when I'm using it. I fixed my connection manager, to shutdown wheel in DESTROY and now everything works).