зеркало из https://github.com/mono/xsp.git
Backport of r141958
svn path=/branches/mono-2-4-2/xsp/; revision=141960
This commit is contained in:
Родитель
b08cfed387
Коммит
b8db2b2376
|
@ -1,3 +1,8 @@
|
|||
2009-09-15 Marek Habersack <mhabersack@novell.com>
|
||||
|
||||
* src/Mono.WebServer.XSP/main.cs: sleep after catching
|
||||
ThreadAbortException in RealMain, before exiting.
|
||||
|
||||
2009-08-21 Marek Habersack <mhabersack@novell.com>
|
||||
|
||||
* test/2.0/treeview/treeview.aspx: use
|
||||
|
|
|
@ -260,7 +260,7 @@ namespace Mono.WebServer.XSP
|
|||
while (true) {
|
||||
try {
|
||||
return new Server ().RealMain (args, true, null, quiet);
|
||||
} catch (ThreadAbortException) {
|
||||
} catch (ThreadAbortException ex) {
|
||||
// Single-app mode and ASP.NET appdomain unloaded
|
||||
Thread.ResetAbort ();
|
||||
quiet = true; // hush 'RealMain'
|
||||
|
@ -464,15 +464,22 @@ namespace Mono.WebServer.XSP
|
|||
if (!quiet)
|
||||
Console.WriteLine ("Hit Return to stop the server.");
|
||||
|
||||
bool doSleep;
|
||||
while (true) {
|
||||
doSleep = false;
|
||||
try {
|
||||
Console.ReadLine ();
|
||||
break;
|
||||
} catch (IOException) {
|
||||
// This might happen on appdomain unload
|
||||
// until the previous threads are terminated.
|
||||
Thread.Sleep (500);
|
||||
doSleep = true;
|
||||
} catch (ThreadAbortException) {
|
||||
doSleep = true;
|
||||
}
|
||||
|
||||
if (doSleep)
|
||||
Thread.Sleep (500);
|
||||
}
|
||||
server.Stop ();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче