You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2016/02/24 11:27:53 UTC
[2/2] camel git commit: CAMEL-9639: camel-netty - Should invalidate
object if cannot return to pool.
CAMEL-9639: camel-netty - Should invalidate object if cannot return to pool.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/14ec99f5
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/14ec99f5
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/14ec99f5
Branch: refs/heads/camel-2.15.x
Commit: 14ec99f5252937f91875206422f5129a0f25108c
Parents: 3a9145f
Author: Claus Ibsen <da...@apache.org>
Authored: Wed Feb 24 11:27:08 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Wed Feb 24 11:27:33 2016 +0100
----------------------------------------------------------------------
.../java/org/apache/camel/component/netty4/NettyProducer.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/14ec99f5/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 6292ede..265dedd 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
@@ -481,9 +481,13 @@ public class NettyProducer extends DefaultAsyncProducer {
if (channel.isActive()) {
LOG.trace("Putting channel back to pool {}", channel);
pool.returnObject(channel);
+ } else {
+ // and if its not active then invalidate it
+ LOG.trace("Invalidating channel from pool {}", channel);
+ pool.invalidateObject(channel);
}
} catch (Exception e) {
- LOG.warn("Error returning channel to pool {}. This exception will be ignored.", channel);
+ LOG.warn("Error returning channel to pool " + channel + ". This exception will be ignored.", e);
} finally {
// ensure we call the delegated callback
callback.done(doneSync);