Fix dynamic callback on HL (resolves issues in cURL)

This commit is contained in:
Joshua Granick
2024-01-04 08:48:45 -08:00
parent 8e54e6db47
commit 9b9faae177
2 changed files with 10 additions and 5 deletions

View File

@@ -377,7 +377,7 @@ class NativeHTTPRequest
}
}
private function curl_onProgress(curl:CURL, dltotal:Float, dlnow:Float, uptotal:Float, upnow:Float):Void
private function curl_onProgress(curl:CURL, dltotal:Float, dlnow:Float, uptotal:Float, upnow:Float):Int
{
if (upnow > writeBytesLoaded || dlnow > writeBytesLoaded || uptotal > writeBytesTotal || dltotal > writeBytesTotal)
{
@@ -389,6 +389,8 @@ class NativeHTTPRequest
// Wrong thread
// promise.progress (bytesLoaded, bytesTotal);
}
return 0;
}
private function curl_onWrite(curl:CURL, output:Bytes):Int