Skip to content

Commit b41f6c9

Browse files
committed
replace deprecated CURLOPT_PROGRESSFUNCTION
1 parent 819c494 commit b41f6c9

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

loader/src/utils/web.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -718,12 +718,10 @@ class WebRequest::Impl {
718718

719719
// Track & post progress on the Promise
720720
// onProgress can only be not set if using sendSync without one, and hasBeenCancelled is always null in that case
721-
curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, requestData);
722-
curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, +[](void* ptr, double dtotal, double dnow, double utotal, double unow) -> int {
721+
curl_easy_setopt(curl, CURLOPT_XFERINFODATA, requestData);
722+
curl_easy_setopt(curl, CURLOPT_XFERINFOFUNCTION, +[](void* ptr, curl_off_t dtotal, curl_off_t dnow, curl_off_t utotal, curl_off_t unow) -> int {
723723
auto data = static_cast<ResponseData*>(ptr);
724724

725-
// TODO v5: external cancellation?
726-
727725
// Store progress inside the request
728726
using enum std::memory_order;
729727
auto& r = *data->request;

0 commit comments

Comments
 (0)