1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-07 21:58:06 -05:00

add T6 to list of games requiring delay before reading rcon response

This commit is contained in:
RaidMax 2024-11-28 20:53:21 -06:00
parent 6875d864d6
commit edd81d903b
No known key found for this signature in database
GPG Key ID: 97D1158CFCDAF9B2

View File

@ -34,6 +34,7 @@ namespace Integrations.Cod
private readonly ILogger _log; private readonly ILogger _log;
private readonly Encoding _gameEncoding; private readonly Encoding _gameEncoding;
private readonly int _retryAttempts; private readonly int _retryAttempts;
private static readonly Server.Game[] RconDelayGames = [Server.Game.IW3, Server.Game.T4, Server.Game.T5, Server.Game.T6];
public CodRConConnection(IPEndPoint ipEndpoint, string password, ILogger<CodRConConnection> log, public CodRConConnection(IPEndPoint ipEndpoint, string password, ILogger<CodRConConnection> log,
Encoding gameEncoding, int retryAttempts) Encoding gameEncoding, int retryAttempts)
@ -377,9 +378,9 @@ namespace Integrations.Cod
await ReceiveAndStoreSocketData(rconSocket, token, connectionState); await ReceiveAndStoreSocketData(rconSocket, token, connectionState);
if (_parser.GameName is Server.Game.IW3 or Server.Game.T4) if (RconDelayGames.Contains(_parser.GameName))
{ {
await Task.Delay(100, token); // CoD4x shenanigans await Task.Delay(100, token);
} }
while (rconSocket.Available > 0) while (rconSocket.Available > 0)