diff options
author | sfan5 <sfan5@live.de> | 2021-04-02 00:19:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-02 00:19:39 +0200 |
commit | 34888a914e1eccce8082f45089aec17d5a2815c2 (patch) | |
tree | 31a855edf48c2cdab4da0b3e113b6a33574dfa55 /src/client/clientmedia.cpp | |
parent | 3560691c0aecd89dc7f7d91ed8c4f1eaa9715eaf (diff) | |
download | minetest-34888a914e1eccce8082f45089aec17d5a2815c2.tar.gz minetest-34888a914e1eccce8082f45089aec17d5a2815c2.tar.bz2 minetest-34888a914e1eccce8082f45089aec17d5a2815c2.zip |
Sort out cURL timeouts and increase default
Diffstat (limited to 'src/client/clientmedia.cpp')
-rw-r--r-- | src/client/clientmedia.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/client/clientmedia.cpp b/src/client/clientmedia.cpp index c4c08c05d..0f9ba5356 100644 --- a/src/client/clientmedia.cpp +++ b/src/client/clientmedia.cpp @@ -216,7 +216,6 @@ void ClientMediaDownloader::initialStep(Client *client) // This is the first time we use httpfetch, so alloc a caller ID m_httpfetch_caller = httpfetch_caller_alloc(); - m_httpfetch_timeout = g_settings->getS32("curl_timeout"); // Set the active fetch limit to curl_parallel_limit or 84, // whichever is greater. This gives us some leeway so that @@ -258,8 +257,6 @@ void ClientMediaDownloader::initialStep(Client *client) remote->baseurl + MTHASHSET_FILE_NAME; fetch_request.caller = m_httpfetch_caller; fetch_request.request_id = m_httpfetch_next_id; // == i - fetch_request.timeout = m_httpfetch_timeout; - fetch_request.connect_timeout = m_httpfetch_timeout; fetch_request.method = HTTP_POST; fetch_request.raw_data = required_hash_set; fetch_request.extra_headers.emplace_back( @@ -432,9 +429,8 @@ void ClientMediaDownloader::startRemoteMediaTransfers() fetch_request.url = url; fetch_request.caller = m_httpfetch_caller; fetch_request.request_id = m_httpfetch_next_id; - fetch_request.timeout = 0; // no data timeout! - fetch_request.connect_timeout = - m_httpfetch_timeout; + fetch_request.timeout = + g_settings->getS32("curl_file_download_timeout"); httpfetch_async(fetch_request); m_remote_file_transfers.insert(std::make_pair( |