Gracefully exit on restart instead of forcibly killing it

This commit is contained in:
Mark McDowall
2014-03-09 22:35:50 -07:00
parent ce13be3d43
commit c2087af8c9
13 changed files with 92 additions and 22 deletions

View File

@@ -295,6 +295,14 @@ namespace Microsoft.AspNet.SignalR.Messaging
Trace.TraceEvent(TraceEventType.Verbose, 0, "Dispoing the broker");
//Check if OS is not Windows and exit
var platform = (int)Environment.OSVersion.Platform;
if ((platform == 4) || (platform == 6) || (platform == 128))
{
return;
}
// Wait for all threads to stop working
WaitForDrain();