mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 15:20:48 -05:00
harden up the script timer/game interface dvar operations for multithreading
This commit is contained in:
@ -867,6 +867,12 @@ namespace IW4MAdmin
|
||||
/// <returns></returns>
|
||||
async Task<List<EFClient>[]> PollPlayersAsync(CancellationToken token)
|
||||
{
|
||||
if (DateTime.Now - (MatchEndTime ?? MatchStartTime) < TimeSpan.FromSeconds(15))
|
||||
{
|
||||
ServerLogger.LogDebug("Skipping status poll attempt because the match ended recently");
|
||||
return null;
|
||||
}
|
||||
|
||||
var currentClients = GetClientsAsList();
|
||||
var statusResponse = await this.GetStatusAsync(token);
|
||||
|
||||
@ -874,7 +880,7 @@ namespace IW4MAdmin
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
var polledClients = statusResponse.Clients.AsEnumerable();
|
||||
|
||||
if (Manager.GetApplicationSettings().Configuration().IgnoreBots)
|
||||
|
Reference in New Issue
Block a user