Release the Connection:释放连接 This is a crucial step to keep things flowing. We must tell HttpClient that we are done with the connection and that it can now be reused. Without doing this HttpClient will wait indefinitely for a connection to free up so…
Invalid use of SingleClientConnManager: connection still allocated httpPost.releaseConnection(); 该代码只会复用连接,并不会关闭当前连接,其实下面的方法client.getConnectionManager().closeIdleConnections(0, TimeUnit.MICROSECONDS); 在某些时候也没关闭,感觉和httpPost.releaseConnection(); 只是起到…