You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2011/08/09 12:58:06 UTC
svn commit: r1155303 -
/httpcomponents/httpcore/trunk/httpcore/src/examples/org/apache/http/examples/ElementalPoolingHttpGet.java
Author: olegk
Date: Tue Aug 9 10:58:05 2011
New Revision: 1155303
URL: http://svn.apache.org/viewvc?rev=1155303&view=rev
Log:
Minor example code enhancement
Modified:
httpcomponents/httpcore/trunk/httpcore/src/examples/org/apache/http/examples/ElementalPoolingHttpGet.java
Modified: httpcomponents/httpcore/trunk/httpcore/src/examples/org/apache/http/examples/ElementalPoolingHttpGet.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/examples/org/apache/http/examples/ElementalPoolingHttpGet.java?rev=1155303&r1=1155302&r2=1155303&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/examples/org/apache/http/examples/ElementalPoolingHttpGet.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/examples/org/apache/http/examples/ElementalPoolingHttpGet.java Tue Aug 9 10:58:05 2011
@@ -109,7 +109,7 @@ public class ElementalPoolingHttpGet {
try {
Future<BasicPoolEntry> future = pool.lease(this.target, null);
- boolean reusable = true;
+ boolean reusable = false;
BasicPoolEntry entry = future.get();
try {
HttpClientConnection conn = entry.getConnection();
@@ -132,10 +132,8 @@ public class ElementalPoolingHttpGet {
ConnectionReuseStrategy connStrategy = new DefaultConnectionReuseStrategy();
reusable = connStrategy.keepAlive(response, context);
} catch (IOException ex) {
- reusable = false;
throw ex;
} catch (HttpException ex) {
- reusable = false;
throw ex;
} finally {
if (reusable) {