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
This commit is contained in:
Jesse McConnell 2011-06-16 21:28:24 +00:00
parent f886b777e8
commit 82902b49eb
1 changed files with 14 additions and 0 deletions

View File

@ -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();