From 2dc2851aee098927194b7e2e1b480d028d765238 Mon Sep 17 00:00:00 2001 From: hns Date: Tue, 22 Mar 2005 10:53:09 +0000 Subject: [PATCH] Use higher (10 minutes) default request timeout if rhino debugger is on. --- src/helma/framework/core/Application.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/helma/framework/core/Application.java b/src/helma/framework/core/Application.java index afc56b1a..436911b5 100644 --- a/src/helma/framework/core/Application.java +++ b/src/helma/framework/core/Application.java @@ -98,7 +98,8 @@ public final class Application implements IPathElement, Runnable { // internal worker thread for scheduler, session cleanup etc. Thread worker; - long requestTimeout = 60000; // 60 seconds for request timeout. + // request timeout defaults to 60 seconds + long requestTimeout = 60000; ThreadGroup threadgroup; // Map of requesttrans -> active requestevaluators @@ -1616,7 +1617,11 @@ public final class Application implements IPathElement, Runnable { // debug flag debug = "true".equalsIgnoreCase(props.getProperty("debug")); - String reqTimeout = props.getProperty("requesttimeout", "60"); + // if rhino debugger is enabled use higher (10 min) default request timeout + String defaultReqTimeout = + "true".equalsIgnoreCase(props.getProperty("rhino.debug")) ? + "600" : "60"; + String reqTimeout = props.getProperty("requesttimeout", defaultReqTimeout); try { requestTimeout = Long.parseLong(reqTimeout) * 1000L; } catch (Exception ignore) {