Release HttpClient resources
----------------------------
Key: DROIDS-63
URL: https://issues.apache.org/jira/browse/DROIDS-63
Project: Droids
Issue Type: Bug
Components: core
Affects Versions: 0.01
Environment: Java VM 1.6.0_12
Reporter: Javier Puerto
I made a little crawler to process some intranet documents .Working with the
latest version of Droids I was testing the behaviour with errors. And the
problem is that the HttpClient pool don't release the conections after a status
code 500 from the server.
Reading the documentation for HttpClient (1.1.5), found that is needed to
release the resources.
Index: src/main/java/org/apache/droids/protocol/http/HttpProtocol.java
===================================================================
--- src/main/java/org/apache/droids/protocol/http/HttpProtocol.java
(revision 810841)
+++ src/main/java/org/apache/droids/protocol/http/HttpProtocol.java
(working copy)
@@ -63,6 +63,7 @@
HttpResponse response = httpclient.execute(httpget);
StatusLine statusline = response.getStatusLine();
if (statusline.getStatusCode() != HttpStatus.SC_OK) {
+ httpget.abort();
throw new HttpResponseException(
statusline.getStatusCode(), statusline.getReasonPhrase());
}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.