1
0
mirror of synced 2025-01-31 12:03:46 +01:00

fix: Progress not working with with new http wrapper

This commit is contained in:
WerWolv 2023-03-23 13:32:35 +01:00
parent 9463105172
commit 8ef863cae1
2 changed files with 3 additions and 2 deletions

View File

@ -328,8 +328,8 @@ namespace hex {
std::map<std::string, std::string> m_headers;
u32 m_timeout = 1000;
float m_progress = 0.0F;
bool m_canceled = false;
std::atomic<float> m_progress = 0.0F;
std::atomic<bool> m_canceled = false;
[[maybe_unused]] std::unique_ptr<mbedtls_x509_crt> m_caCert;
static std::string s_caCertData, s_proxyUrl;

View File

@ -16,6 +16,7 @@ namespace hex {
curl_easy_setopt(this->m_curl, CURLOPT_TIMEOUT_MS, 0L);
curl_easy_setopt(this->m_curl, CURLOPT_CONNECTTIMEOUT_MS, this->m_timeout);
curl_easy_setopt(this->m_curl, CURLOPT_NOSIGNAL, 1L);
curl_easy_setopt(this->m_curl, CURLOPT_NOPROGRESS, 0L);
curl_easy_setopt(this->m_curl, CURLOPT_XFERINFODATA, this);
curl_easy_setopt(this->m_curl, CURLOPT_XFERINFOFUNCTION, progressCallback);
curl_easy_setopt(this->m_curl, CURLOPT_PROXY, s_proxyUrl.c_str());