From 1dc015cc65c8f67f74bfd30cc3503c11c2829931 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Thu, 11 Mar 2021 02:48:46 -0800 Subject: [PATCH] [Updater] Check whether we've already had an update triggered --- Source/Core/UICommon/AutoUpdate.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Source/Core/UICommon/AutoUpdate.cpp b/Source/Core/UICommon/AutoUpdate.cpp index a4a7bffec3..5ad5e38495 100644 --- a/Source/Core/UICommon/AutoUpdate.cpp +++ b/Source/Core/UICommon/AutoUpdate.cpp @@ -31,6 +31,7 @@ namespace { +bool s_update_triggered = false; #ifdef _WIN32 const char UPDATER_FILENAME[] = "Updater.exe"; @@ -201,6 +202,14 @@ void AutoUpdateChecker::CheckForUpdate() void AutoUpdateChecker::TriggerUpdate(const AutoUpdateChecker::NewVersionInformation& info, AutoUpdateChecker::RestartMode restart_mode) { + // Check to make sure we don't already have an update triggered + if (s_update_triggered) + { + WARN_LOG_FMT(COMMON, "Auto-update: received a redundant trigger request, ignoring"); + return; + } + + s_update_triggered = true; #ifdef OS_SUPPORTS_UPDATER std::map updater_flags; updater_flags["this-manifest-url"] = info.this_manifest_url;