Invalid use of SingleClientConnManager when using ResponseHandler repeatedly
<p>I am using a <code>BasicResponseHandler</code> to process a <code>String</code> returned by a simple HTTP post/get. However, when I try to make this transaction in rapid succession, I get a SingleClientConnManager error. By way of background, the code below is called when a message is sent as part of a chat program. It gets called repeatedly if multiple messages are sent in a short period of time. </p>

<p>From what I can tell, the issue is that the responseHandler is not releasing the connection before a new connection is initiated. Is there a way to either manually close the connection or should I just use a different approach - e.g. create/read and input stream and close it on my own?</p>

<pre><code>private String getProfileIdForSender(String userId){
try{ 
     httpPost = new HttpPost(PROFILE_URL);
     String serverResponse = httpClient.execute(httpPost, responseHandler);
     JSONObject fullServerResponse = new JSONObject(serverResponse);
     JSONObject extractedResponse =      fullServerResponse.getJSONObject("response");
     JSONObject user = extractedResponse.getJSONObject("user");
     return user.getString("profileid");     
} catch (Exception e) {
     Log.e("GET PROFILE ID", e.toString());
}
</code></pre>

<p>return null;
    }</p>
