Browse Source

Added some extra time-out settings to the Linux CURL code

tags/2021-05-28
jules 10 years ago
parent
commit
e04b7ff1c4
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      modules/juce_core/native/juce_curl_Network.cpp

+ 4
- 2
modules/juce_core/native/juce_curl_Network.cpp View File

@@ -185,9 +185,11 @@ private:
if (timeOutMs > 0)
{
long timeOutSecs = static_cast<long> (ceil (static_cast<double> (timeOutMs) / 1000.0));
long timeOutSecs = ((long) timeOutMs + 999) / 1000;
if (curl_easy_setopt (curl, CURLOPT_CONNECTTIMEOUT, timeOutSecs) != CURLE_OK)
if (curl_easy_setopt (curl, CURLOPT_CONNECTTIMEOUT, timeOutSecs) != CURLE_OK
|| curl_easy_setopt (curl, CURLOPT_LOW_SPEED_LIMIT, 100) != CURLE_OK
|| curl_easy_setopt (curl, CURLOPT_LOW_SPEED_TIME, timeOutSecs) != CURLE_OK)
return false;
}


Loading…
Cancel
Save