1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 15:20:48 -05:00

Make stats update after 10 kills so we don't wait quite as long

Gracefully disconnect clients on shutting down again
This commit is contained in:
RaidMax
2019-08-24 10:02:53 -05:00
parent 981d698f70
commit 5873121780
4 changed files with 55 additions and 15 deletions

View File

@ -220,8 +220,15 @@ namespace IW4MAdmin.Application
{
await Task.Delay(ConfigHandler.Configuration().RConPollRate, _tokenSource.Token);
}
// if a cancellation is received, we want to return immediately
catch { break; }
// if a cancellation is received, we want to return immediately after shutting down
catch
{
foreach (var server in Servers.Where(s => serverIds.Contains(s.EndPoint)))
{
await server.ProcessUpdatesAsync(_tokenSource.Token);
}
break;
}
}
}