From e8246074567ac6e6fd08d47ae012cc85beff9780 Mon Sep 17 00:00:00 2001 From: Archi Date: Sat, 26 Jun 2021 14:12:49 +0200 Subject: [PATCH] Closes #2344 --- ArchiSteamFarm/Core/ASF.cs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/ArchiSteamFarm/Core/ASF.cs b/ArchiSteamFarm/Core/ASF.cs index df607853070a1..fdfa2c8d34817 100644 --- a/ArchiSteamFarm/Core/ASF.cs +++ b/ArchiSteamFarm/Core/ASF.cs @@ -236,11 +236,6 @@ internal static async Task RestartOrExit() { ArchiLogger.LogGenericInfo(string.Format(CultureInfo.CurrentCulture, Strings.UpdateVersionInfo, SharedInfo.Version, newVersion)); if (SharedInfo.Version >= newVersion) { - if (SharedInfo.Version > newVersion) { - ArchiLogger.LogGenericWarning(Strings.WarningPreReleaseVersion); - await Task.Delay(15 * 1000).ConfigureAwait(false); - } - return newVersion; } @@ -898,7 +893,16 @@ private static async Task UpdateAndRestart() { Version? newVersion = await Update().ConfigureAwait(false); - if ((newVersion == null) || (newVersion <= SharedInfo.Version)) { + if (newVersion == null) { + return; + } + + if (SharedInfo.Version >= newVersion) { + if (SharedInfo.Version > newVersion) { + ArchiLogger.LogGenericWarning(Strings.WarningPreReleaseVersion); + await Task.Delay(15 * 1000).ConfigureAwait(false); + } + return; }