Skip to content

Commit

Permalink
Add separate download timeout to allow download of bigger files or on…
Browse files Browse the repository at this point in the history
… low bandwidth lines
  • Loading branch information
sapier authored and sapier committed Jun 26, 2014
1 parent 24face5 commit 13517fb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions minetest.conf.example
Expand Up @@ -212,6 +212,8 @@
# - Downloads performed by main menu (e.g. mod manager)
# Only has an effect if compiled with cURL
#curl_parallel_limit = 8
# maximum time in ms a file download (e.g. a mod download) may take
#curl_file_download_timeout = 300000

# enable usage of remote media server (if provided by server)
#enable_remote_media_server = true
Expand Down
1 change: 1 addition & 0 deletions src/defaultsettings.cpp
Expand Up @@ -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");

Expand Down
1 change: 1 addition & 0 deletions src/guiEngine.cpp
Expand Up @@ -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) {
Expand Down

0 comments on commit 13517fb

Please sign in to comment.