From 8d5b3c52616979b7ad28c259efee158e307fe8bd Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Thu, 31 Mar 2011 00:30:22 +0000 Subject: [PATCH] 341439 Blocking HttpClient does not use soTimeout for timeouts git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@2940 7e9141cc-0065-0410-87d8-b60c137991c4 --- VERSION.txt | 1 + .../main/java/org/eclipse/jetty/client/HttpConnection.java | 7 +++---- .../java/org/eclipse/jetty/client/SocketConnector.java | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/VERSION.txt b/VERSION.txt index db40803d398..2750cfedf8c 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -17,6 +17,7 @@ jetty-7.3.2-SNAPSHOT + 341255 org.eclipse.http usage in AJP/SessionId linkage + 341386 Remote close not detected by HttpClient + 341394 Remove 'Unavailable' JMX attributes of WebAppContext MBean + + 341439 Blocking HttpClient does not use soTimeout for timeouts + JETTY-1245 Pooled Buffers implementation + Ensure generated fragment names are unique + Added extra session removal test diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpConnection.java b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpConnection.java index d8d57b3eaa5..1ac5410ae29 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpConnection.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpConnection.java @@ -712,6 +712,9 @@ public class HttpConnection /* extends AbstractConnection */ implements Connecti } finally { + if (ex != null && ex.getStatus() < HttpExchange.STATUS_COMPLETED) + ex.setStatus(HttpExchange.STATUS_EXPIRED); + try { close(); @@ -721,10 +724,6 @@ public class HttpConnection /* extends AbstractConnection */ implements Connecti Log.ignore(e); } - if (ex != null && ex.getStatus() < HttpExchange.STATUS_COMPLETED) - { - ex.setStatus(HttpExchange.STATUS_EXPIRED); - } } } } 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 39bf0c83851..79bfc45b8e2 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 @@ -55,7 +55,7 @@ class SocketConnector extends AbstractLifeCycle implements HttpClient.Connector socket = SocketFactory.getDefault().createSocket(); } - socket.setSoTimeout(_httpClient.getSoTimeout()); + socket.setSoTimeout(0); socket.setTcpNoDelay(true); Address address = destination.isProxied() ? destination.getProxy() : destination.getAddress();