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:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user