fixed a issue with pinging Master-server

Sometimes initial TickCount is less than zero, so (Environment.TickCount - lastPing) can be less than "MasterPingInterval * 1000". That's why PingMasterServer() is not calling for a long time until somebody connected.
This commit is contained in:
xaionaro
2013-02-13 20:51:37 +04:00
parent 3b3e39b375
commit 86c99c47c9

View File

@@ -25,7 +25,7 @@ namespace OpenRA.Mods.RA.Server
public void Tick(S server) public void Tick(S server)
{ {
if (Environment.TickCount - lastPing > MasterPingInterval * 1000) if ((Environment.TickCount - lastPing > MasterPingInterval * 1000) || isInitialPing)
PingMasterServer(server); PingMasterServer(server);
else else
lock (masterServerMessages) lock (masterServerMessages)