Work around a race condition with local servers.

This commit is contained in:
Paul Chote
2011-05-10 17:49:33 +12:00
parent 33a4f5e29e
commit 814845730f
3 changed files with 24 additions and 18 deletions

View File

@@ -350,15 +350,16 @@ namespace OpenRA
{
if (orderManager.world != null)
orderManager.world.traitDict.PrintReport();
if (IsHost && server != null)
{
Console.WriteLine("Closing server");
server.Shutdown();
}
CloseServer();
JoinLocal();
orderManager.Dispose();
}
public static void CloseServer()
{
if (server != null)
server.Shutdown();
}
public static T CreateObject<T>( string name )
{