diff options
Diffstat (limited to 'src/convert_json.cpp')
-rw-r--r-- | src/convert_json.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/convert_json.cpp b/src/convert_json.cpp index 58eefd901..61db67fd5 100644 --- a/src/convert_json.cpp +++ b/src/convert_json.cpp @@ -55,10 +55,11 @@ Json::Value fetchJsonValue(const std::string url, curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &liststring); curl_easy_setopt(curl, CURLOPT_TIMEOUT_MS, g_settings->getS32("curl_timeout")); + curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT_MS, g_settings->getS32("curl_timeout")); + if (chunk != 0) curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk); - res = curl_easy_perform(curl); if (res != CURLE_OK) errorstream<<"Jsonreader: "<< url <<" not found (" << curl_easy_strerror(res) << ")" <<std::endl; |