reduce warning logs for connecting bots on live radar

This commit is contained in:
RaidMax 2022-04-28 10:35:01 -05:00
parent bc38b36e4a
commit a3b94b50e3

View File

@ -77,7 +77,15 @@ namespace LiveRadar
lock (lockObject) lock (lockObject)
{ {
generatedBotGuid = _botGuidLookups.ContainsKey(botKey) var hasBotKey = _botGuidLookups.ContainsKey(botKey);
if (!hasBotKey && ((string)E.Extra).IsBotGuid())
{
// edge case where the bot guid has not been registered yet
return Task.CompletedTask;
}
generatedBotGuid = hasBotKey
? _botGuidLookups[botKey] ? _botGuidLookups[botKey]
: (E.Extra.ToString() ?? "0").ConvertGuidToLong(NumberStyles.HexNumber); : (E.Extra.ToString() ?? "0").ConvertGuidToLong(NumberStyles.HexNumber);
} }