After forcing some errors and doing some debugging, I found that I was not 
always calling entity.consumecontent() if I got an error, as you suggested 
in another thread. If an actual exception is thrown, I hope I don't have to. 
Nonetheless, if I get a status code other than 200, there can still be 
content. If I do not consume this content, the pool fills up and my thread 
is frozen after about 6 failed requests.  If I do consume said content, then 
I can continue to get errors without deadlock.

I only have one thread so far using the AndroidHttpClient. Last time I tried 
to use a threadpool for this download loop, the performance was not 
worthwhile, but I was creating DefaultHttpClient's from scratch each time. I 
expect to use an ExecutorService. 

It seems like AndroidHttpClient *should* be good for multiple threads since 
it uses ThreadSafeClientConnManager, but using a ThreadLocal sounds like the 
next best thing. 

Nathan

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to