Fix. Call EndGame in one place of server main loop. Ensure UPnP port forward is removed always. 18807.

This commit is contained in:
Vapre
2021-01-09 17:19:47 +01:00
committed by Paul Chote
parent e7cfd2765c
commit f176a0ed83

View File

@@ -274,12 +274,8 @@ namespace OpenRA.Server
if (checkRead.Count > 0)
Socket.Select(checkRead, null, null, localTimeout);
if (State == ServerState.ShuttingDown)
if (State != ServerState.ShuttingDown)
{
EndGame();
break;
}
foreach (var s in checkRead)
{
var serverIndex = checkReadServer.IndexOf(s);
@@ -308,6 +304,7 @@ namespace OpenRA.Server
foreach (var t in serverTraits.WithInterface<ITick>())
t.Tick(this);
}
if (State == ServerState.ShuttingDown)
{