in reply to Re: Timing out POE http client
in thread Timing out POE http client

Hello Rocco and thank you for your reply! Next time I will try emailing you directly. I didn't know if this was a common issue.

I have a follow up question. Instead of waiting for the (admittedly short) one-second keepalive timeout, could I not call the shutdown method on the ConnectionManager when my results are all back? I know it is in $heap->{cm} in the parent Component::Client::HTTP session, but I do not know how to access this heap. "cm" does not seem to be in the heap available to my response handler.

Replies are listed 'Best First'.
Re^3: Timing out POE http client
by rcaputo (Chaplain) on Mar 31, 2006 at 00:38 UTC

    Good question. The short answer's no, POE::Component::Client::HTTP doesn't expose the connection manager it uses. It also doesn't have a way to be shut down ahead of time, which hasn't been needed until now.

    If you're creating your own POE::Component::Client::Keepalive and passing that as the ConnectionManager, however, you still have $cm floating around, and you can shut that down without ill effects. Caveat: I've only tried this in your example program, and only when there are no outstanding requests.