From 82902b49eba1c45d3a2beb68aae12d972bb439d4 Mon Sep 17 00:00:00 2001 From: Jesse McConnell Date: Thu, 16 Jun 2011 21:28:24 +0000 Subject: [PATCH] Add timeout and idleTimeout servlet init parameters to the creation of the http client git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@3391 7e9141cc-0065-0410-87d8-b60c137991c4 --- .../org/eclipse/jetty/servlets/ProxyServlet.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/ProxyServlet.java b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/ProxyServlet.java index f6bedc0bc1f..8e8eb7adead 100644 --- a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/ProxyServlet.java +++ b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/ProxyServlet.java @@ -204,6 +204,20 @@ public class ProxyServlet implements Servlet { client.setMaxConnectionsPerAddress(Integer.parseInt(t)); } + + t = config.getInitParameter("timeout"); + + if ( t != null ) + { + client.setTimeout(Long.parseLong(t)); + } + + t = config.getInitParameter("idleTimeout"); + + if ( t != null ) + { + client.setIdleTimeout(Long.parseLong(t)); + } client.start();