From e685d425ed04a533c2d21d49783259e4c5a6f9d9 Mon Sep 17 00:00:00 2001 From: DanS Date: Tue, 13 Oct 2026 22:02:59 -0500 Subject: [PATCH] fix(updater): cancel the release-metadata request on dialog close The daemon and miner updaters fetch release metadata with a blocking HTTP GET that ignored the updater's cancel flag. Closing the dialog set the flag, but an in-flight metadata request kept running to completion on the worker thread, so the dialog could not tear down promptly on a slow or stalled connection. - The metadata GET now passes the updater's cancel flag through to the HTTP helper, so closing the dialog aborts the request in progress. Co-Authored-By: Claude Opus 4.8 --- src/util/daemon_updater.cpp | 4 +++- src/util/xmrig_updater.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/util/daemon_updater.cpp b/src/util/daemon_updater.cpp index 4dd905e..cb060b2 100644 --- a/src/util/daemon_updater.cpp +++ b/src/util/daemon_updater.cpp @@ -103,7 +103,9 @@ void DaemonUpdater::cancel() std::string DaemonUpdater::httpGet(const std::string& url) { - return httpGetString(url, "[daemon-updater]"); + HttpGetOptions opt; + opt.cancel = &cancel_requested_; + return httpGetString(url, "[daemon-updater]", opt); } bool DaemonUpdater::downloadToFile(const std::string& url, const std::string& destPath) diff --git a/src/util/xmrig_updater.cpp b/src/util/xmrig_updater.cpp index 67453a6..47b8bcc 100644 --- a/src/util/xmrig_updater.cpp +++ b/src/util/xmrig_updater.cpp @@ -92,7 +92,9 @@ void XmrigUpdater::cancel() std::string XmrigUpdater::httpGet(const std::string& url) { - return httpGetString(url, "[xmrig-updater]"); + HttpGetOptions opt; + opt.cancel = &cancel_requested_; + return httpGetString(url, "[xmrig-updater]", opt); } bool XmrigUpdater::downloadToFile(const std::string& url, const std::string& destPath)