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 that it can be reused.this
释放链接是使系统持续运行的一个十分关键的步骤。咱们必须显式地告诉HttpClient,咱们已经用完了一个链接而且这个链接已经能够被收回+复用了。若是不作这个动做,HttpCllient会一直无限地等待链接被释放,而后复用它。code
关键代码:blog
method.releaseConnection();
请将上面的代码放在finally代码块中ci