reject connections if the game is already started

This commit is contained in:
Chris Forbes
2010-03-09 13:56:17 +13:00
parent b58ea17e12
commit 56b1b45965

View File

@@ -105,6 +105,14 @@ namespace OpenRA.Server
var newConn = new Connection { socket = listener.AcceptSocket() };
try
{
if (GameStarted)
{
Console.WriteLine("Rejected connection from {0}; game is already started.",
newConn.socket.RemoteEndPoint);
newConn.socket.Close();
return;
}
newConn.socket.Blocking = false;
newConn.socket.NoDelay = true;