threadsafe
This commit is contained in:
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user