From bceef4f74ef8801451af533595a11ae0c7b99df1 Mon Sep 17 00:00:00 2001 From: Archi Date: Thu, 13 Jul 2023 22:47:42 +0200 Subject: [PATCH] Fix Abry potato server --- .../SteamTokenDumperPlugin.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/SteamTokenDumperPlugin.cs b/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/SteamTokenDumperPlugin.cs index 29068d9f7..75eed0e09 100644 --- a/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/SteamTokenDumperPlugin.cs +++ b/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/SteamTokenDumperPlugin.cs @@ -195,6 +195,9 @@ internal sealed class SteamTokenDumperPlugin : OfficialPlugin, IASF, IBot, IBotC } if (BotSynchronizations.TryRemove(bot, out (SemaphoreSlim RefreshSemaphore, Timer RefreshTimer) synchronization)) { + // Ensure the semaphore is empty, otherwise we're risking disposed exceptions + await synchronization.RefreshSemaphore.WaitAsync().ConfigureAwait(false); + synchronization.RefreshSemaphore.Dispose(); await synchronization.RefreshTimer.DisposeAsync().ConfigureAwait(false);