From e1f62c49050a5bc53bfd935492240f22c61604c7 Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Thu, 14 Jan 2021 20:09:15 +0100 Subject: [PATCH] Issue #5799 - Allow specifying the duration an object can stay in a pool. Fixed AbstractConnectionPool.accept() to wrap the entry into an EntryHolder. Signed-off-by: Simone Bordet --- .../java/org/eclipse/jetty/client/AbstractConnectionPool.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/AbstractConnectionPool.java b/jetty-client/src/main/java/org/eclipse/jetty/client/AbstractConnectionPool.java index fba03ff9ad4..fe42d7b76d5 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/AbstractConnectionPool.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/AbstractConnectionPool.java @@ -288,7 +288,7 @@ public abstract class AbstractConnectionPool extends ContainerLifeCycle implemen if (LOG.isDebugEnabled()) LOG.debug("onCreating {} {}", entry, connection); Attachable attachable = (Attachable)connection; - attachable.setAttachment(entry); + attachable.setAttachment(new EntryHolder(entry)); onCreated(connection); entry.enable(connection, false); idle(connection, false);