atom feed1 message in org.apache.hc.httpclient-usersRe: When is canceled called on a requ...
FromSent OnAttachments
Oleg KalnichevskiJan 28, 2013 7:17 am 
Subject:Re: When is canceled called on a request callback?
From:Oleg Kalnichevski (ole@apache.org)
Date:Jan 28, 2013 7:17:18 am
List:org.apache.hc.httpclient-users

On Mon, 2013-01-28 at 20:58 +0700, Ho Duc Ha wrote:

We're making 10 concurrent HTTP requests via the HttpAsyncClient (with a 0.2 sec minimum delay between requests).

We are seeing sometimes that the cancel() method on the FutureCallback<HttpResponse> object is being called. But I don't see any documentation to help me understand under what conditions cancelled is being called.

What does it mean when the cancelled method is called?

Am I safe to retry such a request, or is this a fatal condition? Do I need to reset the Async client in any way after seeing this request? I notice that once cancel is called it seems like the other concurrent connections are canceled at the same time, in some cases I've seen it recover, and other times I've seen it fail all future requests.

Thanks,

Ha

There can be various causes of request cancellation, including an abnormal termination of the client itself.

Post a _complete_ wire / context log of the session and I'll have a look.

http://hc.apache.org/httpcomponents-client-ga/logging.html

Oleg