Small Main.cs fix
Here's a silly little fix that I just noticed that someone might be interested in.
In RunUO 1.0,
Main.cs Line 628, originally:
now, if you compile and run the RunUO server without scripts, or simply fail it somehow, you'll receive a:
System.Threading.ThreadStateException was unhandled
Message="Thread has not been started."
Source="mscorlib"
StackTrace:
at System.Threading.Thread.JoinInternal()
at System.Threading.Thread.Join()
at Server.Core.HandleClosed()
at Server.Core.CurrentDomain_ProcessExit(Object sender, EventArgs e)
here's something that I came up with in five minutes to "fix" this little issue:
of course, the 2.0 version may have changed this all completely...
*shrug*
Takes care of the Exception at least.
Here's a silly little fix that I just noticed that someone might be interested in.
In RunUO 1.0,
Main.cs Line 628, originally:
Code:
timerThread.Join();
Console.WriteLine( "done" );
System.Threading.ThreadStateException was unhandled
Message="Thread has not been started."
Source="mscorlib"
StackTrace:
at System.Threading.Thread.JoinInternal()
at System.Threading.Thread.Join()
at Server.Core.HandleClosed()
at Server.Core.CurrentDomain_ProcessExit(Object sender, EventArgs e)
here's something that I came up with in five minutes to "fix" this little issue:
Code:
if (timerThread.ThreadState == System.Threading.ThreadState.Running)
timerThread.Join();
else
timerThread.Abort();
*shrug*
Takes care of the Exception at least.