You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Ho Duc Ha <ha...@trancorp.com> on 2013/01/28 14:58:19 UTC

When is canceled called on a request callback?

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


Re: When is canceled called on a request callback?

Posted by Oleg Kalnichevski <ol...@apache.org>.
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


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org