diff --git a/ArchiSteamFarm/Program.cs b/ArchiSteamFarm/Program.cs index b1fbfcd3f31cb..bef84fd064d7e 100644 --- a/ArchiSteamFarm/Program.cs +++ b/ArchiSteamFarm/Program.cs @@ -526,7 +526,10 @@ private static async void OnUnhandledException(object? sender, UnhandledExceptio ArgumentNullException.ThrowIfNull(e.ExceptionObject); await ASF.ArchiLogger.LogFatalException((Exception) e.ExceptionObject).ConfigureAwait(false); - await Exit(1).ConfigureAwait(false); + + if (e.IsTerminating) { + await Exit(1).ConfigureAwait(false); + } } private static async void OnUnobservedTaskException(object? sender, UnobservedTaskExceptionEventArgs e) {