hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: java.io.IOException: Request already aborted - Why ThreadSafeClientConnManager does not renew connection?
Date Wed, 16 Feb 2011 10:48:12 GMT
On 16 February 2011 10:41, Maxim Veksler <maxim@vekslers.org> wrote:
> On Tue, Feb 15, 2011 at 3:06 PM, Oleg Kalnichevski <olegk@apache.org> wrote:
>>
>> Well, I finally spotted an obvious problem with your code, which I
>> should have found earlier: HttpRequest objects are NOT thread-safe. They
>> may not be used by multiple threads.
>>
>> Oleg
>>
>
> Hi Oleg,
>
> By HttpRequest you mean HttpClient?

No, I'm pretty sure he means HttpRequest.

> If so then I believe it's a documentation bug because the code is
> mostly based on this sample:
> http://hc.apache.org/httpcomponents-client-ga/tutorial/html/connmgmt.html#d4e650.
> Also it's perhaps wise to document that fact that the class is not
> thread safe in the javadoc's.
>
> I've shared my test code https://gist.github.com/829061, could you
> perhaps run it on your machine? It's and eclipse project with
> m2eclipse support configured.
>
> As for the code, I've made the modifications but the behavior remains:

The code still shares a single HttpGet instance.

Please fix that and try again.

---------------------------------------------------------------------
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