Remove broken and disabled by default Server.TimeOut setting.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user