summaryrefslogtreecommitdiff
path: root/indra/llmessage/llcurl.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2010-03-02 12:03:00 -0600
committerDave Parks <davep@lindenlab.com>2010-03-02 12:03:00 -0600
commite9d926385f4d8933d10bb4a3168628e0a6f0ad2a (patch)
tree4872fadf687440bb1ca2da165c27290f53688737 /indra/llmessage/llcurl.cpp
parent21586ca40f661ec0c5bcce37dc681b3b37ee5a08 (diff)
Curl tweaks to get rid of various types of timeouts.
- Scrub host names from capability ips (requires disabling SSL host name verification) - Reset connections that have received a timeout (avoids cascading timeouts from reusing a cached bad connection)
Diffstat (limited to 'indra/llmessage/llcurl.cpp')
-rw-r--r--indra/llmessage/llcurl.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/indra/llmessage/llcurl.cpp b/indra/llmessage/llcurl.cpp
index c640e176ee..637110ba0f 100644
--- a/indra/llmessage/llcurl.cpp
+++ b/indra/llmessage/llcurl.cpp
@@ -353,9 +353,10 @@ LLCurl::Easy* LLCurl::Easy::getEasy()
return NULL;
}
- // set no DMS caching as default for all easy handles. This prevents them adopting a
+ // set no DNS caching as default for all easy handles. This prevents them adopting a
// multi handles cache if they are added to one.
curl_easy_setopt(easy->mCurlEasyHandle, CURLOPT_DNS_CACHE_TIMEOUT, 0);
+
++gCurlEasyCount;
return easy;
}
@@ -440,6 +441,7 @@ U32 LLCurl::Easy::report(CURLcode code)
{
responseCode = 499;
responseReason = strerror(code) + " : " + mErrorBuffer;
+ setopt(CURLOPT_FRESH_CONNECT, TRUE);
}
if (mResponder)
@@ -526,7 +528,7 @@ void LLCurl::Easy::prepRequest(const std::string& url,
if (post) setoptString(CURLOPT_ENCODING, "");
-// setopt(CURLOPT_VERBOSE, 1); // usefull for debugging
+ //setopt(CURLOPT_VERBOSE, 1); // usefull for debugging
setopt(CURLOPT_NOSIGNAL, 1);
mOutput.reset(new LLBufferArray);
@@ -543,9 +545,12 @@ void LLCurl::Easy::prepRequest(const std::string& url,
setCA();
setopt(CURLOPT_SSL_VERIFYPEER, LLCurl::getSSLVerify());
- setopt(CURLOPT_SSL_VERIFYHOST, LLCurl::getSSLVerify()? 2 : 0);
+ //setopt(CURLOPT_SSL_VERIFYHOST, LLCurl::getSSLVerify()? 2 : 0);
+ setopt(CURLOPT_SSL_VERIFYHOST, 0);
setopt(CURLOPT_TIMEOUT, CURL_REQUEST_TIMEOUT);
+ setopt(CURLOPT_FORBID_REUSE, TRUE);
+
setoptString(CURLOPT_URL, url);
mResponder = responder;