reject connections if the game is already started
This commit is contained in:
@@ -105,6 +105,14 @@ namespace OpenRA.Server
|
|||||||
var newConn = new Connection { socket = listener.AcceptSocket() };
|
var newConn = new Connection { socket = listener.AcceptSocket() };
|
||||||
try
|
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.Blocking = false;
|
||||||
newConn.socket.NoDelay = true;
|
newConn.socket.NoDelay = true;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user