1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-13 16:45:20 +02:00

Enforce minimum for curl(_file_download)_timeout

This commit is contained in:
sfan5
2023-09-26 16:00:16 +02:00
parent ac8a9f9502
commit 9ec40ce8e9
5 changed files with 14 additions and 5 deletions

View File

@@ -574,7 +574,8 @@ bool GUIEngine::downloadFile(const std::string &url, const std::string &target)
HTTPFetchResult fetch_result;
fetch_request.url = url;
fetch_request.caller = HTTPFETCH_SYNC;
fetch_request.timeout = g_settings->getS32("curl_file_download_timeout");
fetch_request.timeout = std::max(MIN_HTTPFETCH_TIMEOUT,
(long)g_settings->getS32("curl_file_download_timeout"));
httpfetch_sync(fetch_request, fetch_result);
if (!fetch_result.succeeded) {