From c8e6ec68700581bf12bcd43c5d136ca7d158b5d9 Mon Sep 17 00:00:00 2001 From: JustArchi Date: Sat, 30 Mar 2019 21:00:41 +0100 Subject: [PATCH] Correct mutex release --- ArchiSteamFarm/OS.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ArchiSteamFarm/OS.cs b/ArchiSteamFarm/OS.cs index 31de27ba9..2d0a00d0a 100644 --- a/ArchiSteamFarm/OS.cs +++ b/ArchiSteamFarm/OS.cs @@ -100,7 +100,8 @@ namespace ArchiSteamFarm { return; } - SingleInstance.ReleaseMutex(); + // We should release the mutex here, but that can be done only from the same thread due to thread affinity + // Instead, we'll dispose the mutex which should automatically release it by the CLR SingleInstance.Dispose(); SingleInstance = null; }