Fix fdfcb09: for content service, fallback to TCP downloads when HTTP stalls (#12056)

This commit is contained in:
Patric Stout
2024-02-11 20:24:28 +01:00
committed by GitHub
parent 8d9fa0ea89
commit 5b3bfe4c4c
5 changed files with 14 additions and 6 deletions

View File

@@ -190,7 +190,7 @@ void HttpThread()
/* Setup our (C-style) callback function which we pipe back into the callback. */
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, +[](char *ptr, size_t size, size_t nmemb, void *userdata) -> size_t {
Debug(net, 4, "HTTP callback: {} bytes", size * nmemb);
Debug(net, 6, "HTTP callback: {} bytes", size * nmemb);
HTTPThreadSafeCallback *callback = static_cast<HTTPThreadSafeCallback *>(userdata);
/* Copy the buffer out of CURL. OnReceiveData() will free it when done. */

View File

@@ -165,7 +165,7 @@ void NetworkHTTPRequest::WinHttpCallback(DWORD code, void *info, DWORD length)
} break;
case WINHTTP_CALLBACK_STATUS_READ_COMPLETE:
Debug(net, 4, "HTTP callback: {} bytes", length);
Debug(net, 6, "HTTP callback: {} bytes", length);
this->callback.OnReceiveData(std::unique_ptr<char[]>(static_cast<char *>(info)), length);