Skip Menu |
 

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

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

People
Owner: Nobody in particular
Requestors: jbisbee [...] gmail.com
Cc:
AdminCc:

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



Subject: Erroneous pending_requests_count
Date: Mon, 5 Oct 2009 16:42:00 -0400
To: bug-POE-Component-Client-HTTP [...] rt.cpan.org
From: Jeff Bisbee <jbisbee [...] gmail.com>
Download (untitled) / with headers
text/plain 1.9k
I was keeping track of pending requests myself, then realised that I might be able to use 'pending_requests_count'. I soon found that the result for that calls wasn't being updated correctly. I would think that the pending requests would be decremented right before it was handed to the my _response state. Here is my test script output. (I've also attached the test script itself) Fetched 18 (http://www.google.com) Actual Pending: 19, PoCoCl::HTTP Pending: 20 Fetched 14 (http://www.google.com) Actual Pending: 18, PoCoCl::HTTP Pending: 20 Fetched 15 (http://www.google.com) Actual Pending: 17, PoCoCl::HTTP Pending: 20 Fetched 12 (http://www.google.com) Actual Pending: 16, PoCoCl::HTTP Pending: 20 Fetched 20 (http://www.google.com) Actual Pending: 15, PoCoCl::HTTP Pending: 20 Fetched 19 (http://www.google.com) Actual Pending: 14, PoCoCl::HTTP Pending: 20 Fetched 11 (http://www.google.com) Actual Pending: 13, PoCoCl::HTTP Pending: 20 Fetched 4 (http://www.google.com) Actual Pending: 12, PoCoCl::HTTP Pending: 20 Fetched 6 (http://www.google.com) Actual Pending: 11, PoCoCl::HTTP Pending: 20 Fetched 3 (http://www.google.com) Actual Pending: 10, PoCoCl::HTTP Pending: 20 Fetched 7 (http://www.google.com) Actual Pending: 9, PoCoCl::HTTP Pending: 20 Fetched 16 (http://www.google.com) Actual Pending: 8, PoCoCl::HTTP Pending: 20 Fetched 1 (http://www.google.com) Actual Pending: 7, PoCoCl::HTTP Pending: 20 Fetched 10 (http://www.google.com) Actual Pending: 6, PoCoCl::HTTP Pending: 20 Fetched 13 (http://www.google.com) Actual Pending: 5, PoCoCl::HTTP Pending: 20 Fetched 5 (http://www.google.com) Actual Pending: 4, PoCoCl::HTTP Pending: 20 Fetched 8 (http://www.google.com) Actual Pending: 3, PoCoCl::HTTP Pending: 20 Fetched 2 (http://www.google.com) Actual Pending: 2, PoCoCl::HTTP Pending: 20 Fetched 9 (http://www.google.com) Actual Pending: 1, PoCoCl::HTTP Pending: 20 Fetched 17 (http://www.google.com) Actual Pending: 0, PoCoCl::HTTP Pending: 1 Jeff Bisbee / jbisbee@gmail.com
Download pending_requests.pl
text/x-perl 3.4k

Message body is not shown because sender requested not to inline it.

Download (untitled) / with headers
text/plain 891b
Hello, Thanks very much for pointing out this bug, and even more so for making a testcase! I've converted the testcase to use Test::More style so we can include it in the testsuite :) I've found the root cause for this, and it's been fixed in the repository. The component issued a small delay after each request was processed so it could "watch" for any events from the server. ( EOF, whatever ) This seems to be old code, and I've cleaned up other areas of the code so that it's not needed anymore. However, your testcase as it stands still doesn't pass. This is because of parallelism and timing issues. There could be responses flying around in POE's queue and the component already decreased the pending count while you haven't seen them. I hope you'll understand that we cannot solve this 100% due to POE's asynchronous nature. Thanks again for reporting this! -- ~Apocalypse
It looks like Apocal has resolved this within reason.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.