Revert to a lock
This commit is contained in:
@@ -39,6 +39,7 @@ public class BotController(
|
||||
{
|
||||
private readonly BotConfig _botConfig = _configServer.GetConfig<BotConfig>();
|
||||
private readonly PmcConfig _pmcConfig = _configServer.GetConfig<PmcConfig>();
|
||||
private static readonly Lock BotListLock = new();
|
||||
|
||||
/// <summary>
|
||||
/// Return the number of bot load-out varieties to be generated
|
||||
@@ -201,7 +202,10 @@ public class BotController(
|
||||
condition.Limit), // Choose largest between value passed in from request vs what's in bot.config
|
||||
_botHelper.IsBotPmc(condition.Role));
|
||||
|
||||
result.AddRange(GenerateBotWave(condition, botWaveGenerationDetails, sessionId));
|
||||
lock (BotListLock)
|
||||
{
|
||||
result.AddRange(GenerateBotWave(condition, botWaveGenerationDetails, sessionId));
|
||||
}
|
||||
})).ToArray());
|
||||
|
||||
stopwatch.Stop();
|
||||
|
||||
Reference in New Issue
Block a user