更新时间:2023-02-17 15:52:34
回答我自己的问题:释放连接请求)您必须关闭由HttpEntity返回的InputStream:
To answer my own question: to release the connection (and any other resources associated with the request) you must close the InputStream returned by the HttpEntity:
InputStream is = entity.getContent();
.... process the input stream ....
is.close(); // releases all resources
从docs