diff --git a/jetty-core/jetty-util/src/main/java/org/eclipse/jetty/util/ConcurrentPool.java b/jetty-core/jetty-util/src/main/java/org/eclipse/jetty/util/ConcurrentPool.java index a24c4f755ef2..b6bb6b2be261 100644 --- a/jetty-core/jetty-util/src/main/java/org/eclipse/jetty/util/ConcurrentPool.java +++ b/jetty-core/jetty-util/src/main/java/org/eclipse/jetty/util/ConcurrentPool.java @@ -468,8 +468,14 @@ public boolean enable(E pooled, boolean acquire) @Override public E getPooled() { - this.pooled = null; - return weakPooled == null ? null : weakPooled.get(); + try + { + return weakPooled == null ? null : weakPooled.get(); + } + finally + { + this.pooled = null; + } } @Override