diff options
author | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2004-09-05 23:30:18 +0400 |
---|---|---|
committer | Gonzalo Paniagua Javier <gonzalo.mono@gmail.com> | 2004-09-05 23:30:18 +0400 |
commit | 324d98f7c8d7d340d281d50386ce42b9550e74da (patch) | |
tree | ca6c9035c4cff51a3935891143e6bdfb437f9797 | |
parent | e51d417f2f645da5486fa9b8c87149b007b6d90d (diff) |
2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* HttpApplication.cs: only add/remove to/from the timeout
manager when we're in a interruptible step.
svn path=/branches/mono-1-0/mcs/; revision=33377
-rw-r--r-- | mcs/class/System.Web/System.Web/ChangeLog | 4 | ||||
-rw-r--r-- | mcs/class/System.Web/System.Web/HttpApplication.cs | 10 |
2 files changed, 12 insertions, 2 deletions
diff --git a/mcs/class/System.Web/System.Web/ChangeLog b/mcs/class/System.Web/System.Web/ChangeLog index 6aea602f750..cd306ffaded 100644 --- a/mcs/class/System.Web/System.Web/ChangeLog +++ b/mcs/class/System.Web/System.Web/ChangeLog @@ -1,3 +1,7 @@ +2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com> + + * HttpApplication.cs: only add/remove to/from the timeout + manager when we're in a interruptible step. 2004-08-31 Gonzalo Paniagua Javier <gonzalo@ximian.com> diff --git a/mcs/class/System.Web/System.Web/HttpApplication.cs b/mcs/class/System.Web/System.Web/HttpApplication.cs index 09288727b8f..37599a8e1f0 100644 --- a/mcs/class/System.Web/System.Web/HttpApplication.cs +++ b/mcs/class/System.Web/System.Web/HttpApplication.cs @@ -639,6 +639,7 @@ namespace System.Web { bool ready_sync = false; IStateHandler handler; + bool timeoutPossible = false; lock (_app) { _app.OnStateExecuteEnter (); @@ -662,6 +663,10 @@ namespace System.Web handler = _handlers [_currentStateIdx]; _countSteps++; + timeoutPossible = handler.PossibleToTimeout; + if (timeoutPossible) + HttpRuntime.TimeoutManager.Add (_app.Context); + lasterror = ExecuteState (handler, ref ready_sync); if (ready_sync) _countSyncSteps++; @@ -670,6 +675,9 @@ namespace System.Web if (null != lasterror) _app.HandleError (lasterror); } finally { + if (timeoutPossible) + HttpRuntime.TimeoutManager.Remove (_app.Context); + _app.OnStateExecuteLeave (); } } @@ -893,14 +901,12 @@ namespace System.Web SaveThreadCulture (); _savedContext = HttpContext.Context; HttpContext.Context = _Context; - HttpRuntime.TimeoutManager.Add (_Context); SetPrincipal (Context.User); } internal void OnStateExecuteLeave () { RestoreThreadCulture (); - HttpRuntime.TimeoutManager.Remove (_Context); HttpContext.Context = _savedContext; RestorePrincipal (); } |