CAMEL-6611: Must close SSL on exception so client is notified asap.

Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/24b26601
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/24b26601
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/24b26601

Branch: refs/heads/camel-2.10.x
Commit: 24b2660182d66e6c4fbc1f2a1bf86ce2282107a6
Parents: ab76a81
Author: Claus Ibsen <davscl...@apache.org>
Authored: Tue Aug 6 15:36:05 2013 +0200
Committer: Claus Ibsen <davscl...@apache.org>
Committed: Tue Aug 6 15:38:27 2013 +0200

----------------------------------------------------------------------
 .../apache/camel/component/netty/DefaultClientPipelineFactory.java | 2 ++
 .../apache/camel/component/netty/DefaultServerPipelineFactory.java | 2 ++
 2 files changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/24b26601/components/camel-netty/src/main/java/org/apache/camel/component/netty/DefaultClientPipelineFactory.java
----------------------------------------------------------------------
diff --git 
a/components/camel-netty/src/main/java/org/apache/camel/component/netty/DefaultClientPipelineFactory.java
 
b/components/camel-netty/src/main/java/org/apache/camel/component/netty/DefaultClientPipelineFactory.java
index 30a5332..8aa03b1 100644
--- 
a/components/camel-netty/src/main/java/org/apache/camel/component/netty/DefaultClientPipelineFactory.java
+++ 
b/components/camel-netty/src/main/java/org/apache/camel/component/netty/DefaultClientPipelineFactory.java
@@ -51,6 +51,8 @@ public class DefaultClientPipelineFactory extends 
ClientPipelineFactory  {
 
         SslHandler sslHandler = configureClientSSLOnDemand();
         if (sslHandler != null) {
+            // must close on SSL exception
+            sslHandler.setCloseOnSSLException(true);
             LOG.debug("Client SSL handler configured and added to the 
ChannelPipeline: {}", sslHandler);
             addToPipeline("ssl", channelPipeline, sslHandler);
         }

http://git-wip-us.apache.org/repos/asf/camel/blob/24b26601/components/camel-netty/src/main/java/org/apache/camel/component/netty/DefaultServerPipelineFactory.java
----------------------------------------------------------------------
diff --git 
a/components/camel-netty/src/main/java/org/apache/camel/component/netty/DefaultServerPipelineFactory.java
 
b/components/camel-netty/src/main/java/org/apache/camel/component/netty/DefaultServerPipelineFactory.java
index 3fa6ef9..580ac85 100644
--- 
a/components/camel-netty/src/main/java/org/apache/camel/component/netty/DefaultServerPipelineFactory.java
+++ 
b/components/camel-netty/src/main/java/org/apache/camel/component/netty/DefaultServerPipelineFactory.java
@@ -52,6 +52,8 @@ public class DefaultServerPipelineFactory extends 
ServerPipelineFactory {
 
         SslHandler sslHandler = configureServerSSLOnDemand();
         if (sslHandler != null) {
+            // must close on SSL exception
+            sslHandler.setCloseOnSSLException(true);
             LOG.debug("Server SSL handler configured and added as an 
interceptor against the ChannelPipeline: {}", sslHandler);
             addToPipeline("ssl", channelPipeline, sslHandler);
         }

Reply via email to