From 86c99c47c9ca4d624307f8dceee8f89b76504a47 Mon Sep 17 00:00:00 2001 From: xaionaro Date: Wed, 13 Feb 2013 20:51:37 +0400 Subject: [PATCH] https://github.com/OpenRA/OpenRA/issues/2564 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. --- OpenRA.Mods.RA/ServerTraits/MasterServerPinger.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Mods.RA/ServerTraits/MasterServerPinger.cs b/OpenRA.Mods.RA/ServerTraits/MasterServerPinger.cs index d6115e574f..4f6fb8461e 100644 --- a/OpenRA.Mods.RA/ServerTraits/MasterServerPinger.cs +++ b/OpenRA.Mods.RA/ServerTraits/MasterServerPinger.cs @@ -25,7 +25,7 @@ namespace OpenRA.Mods.RA.Server public void Tick(S server) { - if (Environment.TickCount - lastPing > MasterPingInterval * 1000) + if ((Environment.TickCount - lastPing > MasterPingInterval * 1000) || isInitialPing) PingMasterServer(server); else lock (masterServerMessages)