From 50af4d4b62f27150fc52cda2057a87691b49962b Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Fri, 21 Oct 2011 09:20:30 +1100 Subject: [PATCH] 361456 - release timer task on connection failed --- .../main/java/org/eclipse/jetty/client/SelectConnector.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/SelectConnector.java b/jetty-client/src/main/java/org/eclipse/jetty/client/SelectConnector.java index dcdec3bb689..853e7e70f4d 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/SelectConnector.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/SelectConnector.java @@ -228,6 +228,10 @@ class SelectConnector extends AbstractLifeCycle implements HttpClient.Connector @Override protected void connectionFailed(SocketChannel channel, Throwable ex, Object attachment) { + Timeout.Task connectTimeout = _connectingChannels.remove(channel); + if (connectTimeout != null) + connectTimeout.cancel(); + if (attachment instanceof HttpDestination) ((HttpDestination)attachment).onConnectionFailed(ex); else