Author: juraj
Date: 2007-04-04 11:11:02 -0400 (Wed, 04 Apr 2007)
New Revision: 75395
Modified:
trunk/mcs/class/System.Web/System.Web/ChangeLog
trunk/mcs/class/System.Web/System.Web/HttpApplicationFactory.cs
Log:
2007-04-04 Juraj Skripsky <[EMAIL PROTECTED]>
* HttpApplicationFactory.cs: Make sure an web application is shutdown
only once (and Application_End in global.asax is called only once as well).
This is necessary because FileSystemWatcher emits multiple events when
e.g. global.asax is changed.
Modified: trunk/mcs/class/System.Web/System.Web/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web/ChangeLog 2007-04-04 14:53:06 UTC
(rev 75394)
+++ trunk/mcs/class/System.Web/System.Web/ChangeLog 2007-04-04 15:11:02 UTC
(rev 75395)
@@ -1,3 +1,10 @@
+2007-04-04 Juraj Skripsky <[EMAIL PROTECTED]>
+
+ * HttpApplicationFactory.cs: Make sure an web application is shutdown
+ only once (and Application_End in global.asax is called only once as well).
+ This is necessary because FileSystemWatcher emits multiple events when
+ e.g. global.asax is changed.
+
2007-04-01 Vladimir Krasnov <[EMAIL PROTECTED]>
* HttpRequest.cs: fixed Headers property to use optimized
Modified: trunk/mcs/class/System.Web/System.Web/HttpApplicationFactory.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web/HttpApplicationFactory.cs
2007-04-04 14:53:06 UTC (rev 75394)
+++ trunk/mcs/class/System.Web/System.Web/HttpApplicationFactory.cs
2007-04-04 15:11:02 UTC (rev 75395)
@@ -77,6 +77,7 @@
Hashtable app_event_handlers;
static ArrayList watchers = new ArrayList();
static object watchers_lock = new object();
+ static bool app_shutdown = false;
Stack available = new Stack ();
Stack available_for_end = new Stack ();
@@ -540,6 +541,10 @@
static void OnFileChanged(object sender, FileSystemEventArgs
args)
{
lock (watchers_lock) {
+ if(app_shutdown)
+ return;
+ app_shutdown = true;
+
// Disable event raising to avoid concurrent
restarts
foreach (FileSystemWatcher watcher in watchers)
{
watcher.EnableRaisingEvents = false;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches