hc-dev 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 Tue, 15 Feb 2011 15:39:08 GMT
...

> >
> > 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.
> 
> Just had a thought - how about adding some code to detect such misuse?
> One might be able to do this using assertions, which can be enabled at run-time.
> 
> Not sure how easy it would be - and it would be tedious to do it for
> all unsafe objects - but some are more likely to be shared.
> 

I cannot think of a reliable and non-intrusive solution to the problem.

Oleg



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


Mime
View raw message