mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
Add separate download timeout to allow download of bigger files or on low bandwidth lines
This commit is contained in:
parent
24face5249
commit
13517fb726
3 changed files with 4 additions and 0 deletions
|
@ -153,6 +153,7 @@ void set_default_settings(Settings *settings)
|
|||
|
||||
settings->setDefault("curl_timeout", "5000");
|
||||
settings->setDefault("curl_parallel_limit", "8");
|
||||
settings->setDefault("curl_file_download_timeout", "300000");
|
||||
|
||||
settings->setDefault("enable_remote_media_server", "true");
|
||||
|
||||
|
|
|
@ -523,6 +523,7 @@ bool GUIEngine::downloadFile(std::string url,std::string target)
|
|||
HTTPFetchResult fetchresult;
|
||||
fetchrequest.url = url;
|
||||
fetchrequest.caller = HTTPFETCH_SYNC;
|
||||
fetchrequest.timeout = g_settings->getS32("curl_file_download_timeout");
|
||||
httpfetch_sync(fetchrequest, fetchresult);
|
||||
|
||||
if (fetchresult.succeeded) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue