hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: java.io.IOException: Request already aborted - Why ThreadSafeClientConnManager does not renew connection?
Date Wed, 16 Feb 2011 13:14:15 GMT
On Wed, 2011-02-16 at 14:47 +0200, Maxim Veksler wrote:

...

> I've implemented the suggested changes. Please find them at the
> revision https://gist.github.com/829061/8a173df84ce47b288f6b34f675fc708fcf649535
> 
> This has improved the execution, now calling httpGet.abort(); does not
> affect the other running threads.
> 
> Now the only problem I see is that the connection is not being
> "renewed" for the failing threads.
> 
> I've placed a break point at "System.out.println("Breakpoint position");"
> 
> The log of the run is attached below, what's interesting is that
> Thread-4 continued to run even after the abort was called (In the
> previous version, calling abort() would cancel the connection for all
> of the threads.)
> 

Once aborted a request cannot be executed again. Create a new HttpGet
instance for each request execution. They are cheap.

The problem is that HttpClient does not check whether or not a request
has been aborted prior to trying to execute it. Feel free to raise a
JIRA for this defect.

Oleg


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


Mime
View raw message