This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push: new e6304d1 CAMEL-12435: camel-netty4 - Shared connection pool should re-create connection if its no longer valid e6304d1 is described below commit e6304d148b64e0e9a352243483b1ff72f690f6be Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Thu Apr 12 13:46:15 2018 +0200 CAMEL-12435: camel-netty4 - Shared connection pool should re-create connection if its no longer valid --- .../apache/camel/component/netty4/SharedSingletonObjectPool.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/SharedSingletonObjectPool.java b/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/SharedSingletonObjectPool.java index 9121838..b7408bb 100644 --- a/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/SharedSingletonObjectPool.java +++ b/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/SharedSingletonObjectPool.java @@ -38,6 +38,13 @@ public class SharedSingletonObjectPool<T> implements ObjectPool<T> { @Override public synchronized T borrowObject() throws Exception, NoSuchElementException, IllegalStateException { + if (t != null) { + // ensure the object is validate before we borrow it + if (!factory.validateObject(t)) { + invalidateObject(t); + t = null; + } + } if (t == null) { t = factory.makeObject(); } -- To stop receiving notification emails like this one, please contact davscl...@apache.org.