Fixed CS. This closes #1026

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

Branch: refs/heads/master
Commit: 3c11ff553fad9329bd4bf5df577b61d45a8c9cc4
Parents: 96d3ce2
Author: Claus Ibsen <davscl...@apache.org>
Authored: Sun Jun 12 16:30:24 2016 +0200
Committer: Claus Ibsen <davscl...@apache.org>
Committed: Sun Jun 12 16:30:24 2016 +0200

----------------------------------------------------------------------
 .../java/org/apache/camel/component/netty4/NettyProducer.java    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/3c11ff55/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyProducer.java
----------------------------------------------------------------------
diff --git 
a/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyProducer.java
 
b/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyProducer.java
index 81e6cb2..e04452e 100644
--- 
a/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyProducer.java
+++ 
b/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/NettyProducer.java
@@ -284,7 +284,9 @@ public class NettyProducer extends DefaultAsyncProducer {
         final Channel channel = existing;
         final AsyncCallback producerCallback;
 
-        if(configuration.isReuseChannel()) {
+        if (configuration.isReuseChannel()) {
+            // use callback as-is because we should not put it back in the 
pool as NettyProducerCallback would do
+            // as when reuse channel is enabled it will put the channel back 
in the pool when exchange is done using on completion
             producerCallback = callback;
         } else {
             producerCallback = new NettyProducerCallback(channel, callback);

Reply via email to