camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1211414 - /camel/trunk/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/AhcEndpoint.java
Date Wed, 07 Dec 2011 12:33:45 GMT
Author: davsclaus
Date: Wed Dec  7 12:33:45 2011
New Revision: 1211414

URL: http://svn.apache.org/viewvc?rev=1211414&view=rev
Log:
CAMEL-4749: Ensure AsyncHttpClient is closed when stopping producer.

Modified:
    camel/trunk/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/AhcEndpoint.java

Modified: camel/trunk/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/AhcEndpoint.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/AhcEndpoint.java?rev=1211414&r1=1211413&r2=1211414&view=diff
==============================================================================
--- camel/trunk/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/AhcEndpoint.java
(original)
+++ camel/trunk/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/AhcEndpoint.java
Wed Dec  7 12:33:45 2011
@@ -26,6 +26,7 @@ import org.apache.camel.Producer;
 import org.apache.camel.impl.DefaultEndpoint;
 import org.apache.camel.spi.HeaderFilterStrategy;
 import org.apache.camel.spi.HeaderFilterStrategyAware;
+import org.apache.camel.util.IOHelper;
 import org.apache.camel.util.ObjectHelper;
 import org.apache.camel.util.jsse.SSLContextParameters;
 
@@ -186,6 +187,10 @@ public class AhcEndpoint extends Default
     @Override
     protected void doStop() throws Exception {
         super.doStop();
+        // ensure client is closed when stopping
+        if (client != null && !client.isClosed()) {
+            client.close();
+        }
         client = null;
     }
 



Mime
View raw message