mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Added some extra time-out settings to the Linux CURL code
This commit is contained in:
parent
e1205ec36c
commit
e04b7ff1c4
1 changed files with 4 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue