Repository: camel
Updated Branches:
  refs/heads/camel-2.15.x 86f1de519 -> ec2d2394c
  refs/heads/camel-2.16.x 0535e4829 -> 9c8b250e4
  refs/heads/master 2c6cc6a7b -> 904a49b68


CAMEL-9368 - don't fail the exchange if we actually specify to disconnect


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

Branch: refs/heads/master
Commit: 904a49b68cf210c37dae9bacb82caed2dbf2d08e
Parents: 2c6cc6a
Author: Jonathan Anstey <jans...@gmail.com>
Authored: Thu Dec 17 15:55:09 2015 -0330
Committer: Jonathan Anstey <jans...@gmail.com>
Committed: Thu Dec 17 15:55:26 2015 -0330

----------------------------------------------------------------------
 .../camel/component/netty4/handlers/ClientChannelHandler.java   | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/904a49b6/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/handlers/ClientChannelHandler.java
----------------------------------------------------------------------
diff --git 
a/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/handlers/ClientChannelHandler.java
 
b/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/handlers/ClientChannelHandler.java
index 8905540..160adf4 100644
--- 
a/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/handlers/ClientChannelHandler.java
+++ 
b/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/handlers/ClientChannelHandler.java
@@ -121,7 +121,10 @@ public class ClientChannelHandler extends 
SimpleChannelInboundHandler<Object> {
             if (LOG.isDebugEnabled()) {
                 LOG.debug("Channel closed but no message received from 
address: {}", address);
             }
-            exchange.setException(new CamelExchangeException("No response 
received from remote server: " + address, exchange));
+            // don't fail the exchange if we actually specify to disconnect
+            if (!configuration.isDisconnect()) {
+                exchange.setException(new CamelExchangeException("No response 
received from remote server: " + address, exchange));
+            }
             // signal callback
             callback.done(false);
         }

Reply via email to