diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/SocketConnector.java b/jetty-client/src/main/java/org/eclipse/jetty/client/SocketConnector.java index 226cd644ffd..309abe87881 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/SocketConnector.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/SocketConnector.java @@ -97,6 +97,17 @@ class SocketConnector extends AbstractLifeCycle implements HttpClient.Connector destination.onException(e); } } + finally + { + try + { + destination.returnConnection(connection,true); + } + catch (IOException e) + { + LOG.debug(e); + } + } } });