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 <noreply@anthropic.com>
This commit is contained in:
2026-10-13 22:02:59 -05:00
co-authored by Claude Opus 4.8
parent 2396ed33db
commit e685d425ed
2 changed files with 6 additions and 2 deletions
+3 -1
View File
@@ -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)
+3 -1
View File
@@ -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)