Thank you Mark, I didn't actually see that. Turns out I was calling svrClient.getConnectionManager().shutdown(); where svrClient is a HTTPDefaultClient object.
What gets me is that I can call the method that this resides in from two seperate activities and not recieve this error, but call it twice from the same activity and it throws the error. This why I thought it was my AsyncTask. I have now commented out the shutdown() call and it seems to work fine without. Just now need to work out how to clear the underlying listview :) Regards Anthoni On Apr 10, 6:46 pm, Mark Murphy <[email protected]> wrote: > Anthoni wrote: > > I think it is because I am trying to call AsyncTask again. I remember > > reading that the AT can only be called once, but I presumed quite > > wrongly that this meant you can not do concurrent calls. I thought > > that once an AT had done it's task it was cleared and then could be > > called again, but this does not seem to be the case. Is it because of > > AT attempts at more than one call ? > > It's the other way around: AsyncTask does support multiple simultaneous > requests, but a given AsyncTask instance can only be used once. > > However, it's unclear what this has to do with your error, since your > error is that your HttpClient connection manager is shut down: > > > > > > > 04-10 17:25:05.746: ERROR/AndroidRuntime(1446): Caused by: > > java.lang.IllegalStateException: Manager is shut down. > > 04-10 17:25:05.746: ERROR/AndroidRuntime(1446): at > > org.apache.http.impl.conn.SingleClientConnManager.assertStillUp(SingleClien > > tConnManager.java: > > 173) > > 04-10 17:25:05.746: ERROR/AndroidRuntime(1446): at > > org.apache.http.impl.conn.SingleClientConnManager.getConnection(SingleClien > > tConnManager.java: > > 211) > > 04-10 17:25:05.746: ERROR/AndroidRuntime(1446): at > > org.apache.http.impl.conn.SingleClientConnManager > > $1.getConnection(SingleClientConnManager.java:189) > > 04-10 17:25:05.746: ERROR/AndroidRuntime(1446): at > > org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDi > > rector.java: > > 325) > > 04-10 17:25:05.746: ERROR/AndroidRuntime(1446): at > > org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.j > > ava: > > 555) > > 04-10 17:25:05.746: ERROR/AndroidRuntime(1446): at > > org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.j > > ava: > > 487) > > 04-10 17:25:05.746: ERROR/AndroidRuntime(1446): at > > org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.j > > ava: > > 465) > > 04-10 17:25:05.746: ERROR/AndroidRuntime(1446): at > > com.abulba.moviedb.SvrBridge.getResult(SvrBridge.java:73) > > Bear in mind that HttpClient is not thread-safe by default. There are > instructions on the HttpClient site for setting up a thread-safe > connection manager. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://twitter.com/commonsguy > > Android App Developer Books:http://commonsware.com/books -- 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 To unsubscribe, reply using "remove me" as the subject.

