Remove broken and disabled by default Server.TimeOut setting.

This commit is contained in:
Paul Chote
2016-12-08 20:49:28 +00:00
parent 7827d50e99
commit 5188a08c81
2 changed files with 0 additions and 19 deletions

View File

@@ -22,8 +22,6 @@ using OpenRA.Network;
using OpenRA.Primitives;
using OpenRA.Support;
using XTimer = System.Timers.Timer;
namespace OpenRA.Server
{
public enum ServerState
@@ -60,8 +58,6 @@ namespace OpenRA.Server
readonly TcpListener listener;
readonly TypeDictionary serverTraits = new TypeDictionary();
XTimer gameTimeout;
protected volatile ServerState internalState = ServerState.WaitingPlayers;
public ServerState State
@@ -701,18 +697,6 @@ namespace OpenRA.Server
foreach (var t in serverTraits.WithInterface<IStartGame>())
t.GameStarted(this);
// Check TimeOut
if (Settings.TimeOut > 10000)
{
gameTimeout = new XTimer(Settings.TimeOut);
gameTimeout.Elapsed += (_, e) =>
{
Console.WriteLine("Timeout at {0}!!!", e.SignalTime);
Environment.Exit(0);
};
gameTimeout.Enabled = true;
}
}
}
}

View File

@@ -68,9 +68,6 @@ namespace OpenRA
[Desc("Takes a comma separated list of IP addresses that are not allowed to join.")]
public string[] Ban = { };
[Desc("Value in milliseconds when to terminate the game. Needs to be at least 10000 (10 s) to enable the timer.")]
public int TimeOut = 0;
[Desc("For dedicated servers only, controls whether a game can be started with just one human player in the lobby.")]
public bool EnableSingleplayer = false;