Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
chr233 committed Apr 22, 2024
1 parent 78cad93 commit a11df7d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ASFBuffBot/Core/ReflectionHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using ArchiSteamFarm.Helpers;
using ArchiSteamFarm.Plugins;
using ArchiSteamFarm.Steam.Integration;
using System.Collections.Immutable;
using System.Collections.Frozen;
using System.Reflection;

namespace ASFBuffBot.Core;
Expand All @@ -18,7 +18,7 @@ internal static async Task AddBuffService()
if (filedInfo != null)
{
var newValue = new Dictionary<Uri, (ICrossProcessSemaphore RateLimitingSemaphore, SemaphoreSlim OpenConnectionsSemaphore)>(5);
var oldValue = (ImmutableDictionary<Uri, (ICrossProcessSemaphore RateLimitingSemaphore, SemaphoreSlim OpenConnectionsSemaphore)>)filedInfo.GetValue(null);
var oldValue = (FrozenDictionary<Uri, (ICrossProcessSemaphore RateLimitingSemaphore, SemaphoreSlim OpenConnectionsSemaphore)>)filedInfo.GetValue(null);

if (oldValue != null)
{
Expand All @@ -30,7 +30,7 @@ internal static async Task AddBuffService()

newValue.Add(Utils.BuffUrl, (await PluginsCore.GetCrossProcessSemaphore($"{nameof(ArchiWebHandler)}-{nameof(Utils.BuffUrl)}").ConfigureAwait(false), new SemaphoreSlim(5, 5)));

filedInfo.SetValue(null, newValue.ToImmutableDictionary());
filedInfo.SetValue(null, newValue.ToFrozenDictionary());
}
else
{
Expand Down

0 comments on commit a11df7d

Please sign in to comment.