threadsafe

This commit is contained in:
alzeih
2010-07-23 19:03:33 +12:00
committed by Chris Forbes
parent 282d26b844
commit 984e081f3b
5 changed files with 26 additions and 17 deletions

View File

@@ -90,6 +90,13 @@ namespace OpenRA.Server
if (Environment.TickCount - lastPing > MasterPingInterval * 1000)
PingMasterServer();
if (conns.Count() == 0)
{
listener.Stop();
GameStarted = false;
break;
}
}
} ) { IsBackground = true }.Start();
}
@@ -424,15 +431,6 @@ namespace OpenRA.Server
if (conns.Count != 0)
SyncLobbyInfo();
}
public static void CloseServer()
{
while (conns.Count() != 0)
DropClient(conns.ElementAt(conns.Count() - 1), null);
if (listener != null)
listener.Stop();
GameStarted = false;
}
static void SyncLobbyInfo()
{