summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMonty Brandenberg <monty@lindenlab.com>2012-07-03 19:22:24 -0400
committerMonty Brandenberg <monty@lindenlab.com>2012-07-03 19:22:24 -0400
commite38a676c087d0adce9bd35cf3bdf8ff0e898f201 (patch)
tree82af9dd58c4401046e332ba40ccdce97d5a66e44 /indra
parent2d7b7de20327a40be12a620debaae9917af16cd6 (diff)
Add CURLE_SEND_ERROR and CURLE_RECV_ERROR to the set of retryable errors.
Data problems after connections are established should be retried as well. Extend to appropriate libcurl codes. Also allow our connectivity to drop to as low as a single connection when trying to recover.
Diffstat (limited to 'indra')
-rw-r--r--indra/llcorehttp/_httppolicy.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/indra/llcorehttp/_httppolicy.cpp b/indra/llcorehttp/_httppolicy.cpp
index 1b10805b72..1e64924198 100644
--- a/indra/llcorehttp/_httppolicy.cpp
+++ b/indra/llcorehttp/_httppolicy.cpp
@@ -46,7 +46,7 @@ public:
State()
: mConnMax(DEFAULT_CONNECTIONS),
mConnAt(DEFAULT_CONNECTIONS),
- mConnMin(2),
+ mConnMin(1),
mNextSample(0),
mErrorCount(0),
mErrorFactor(0)
@@ -303,6 +303,8 @@ bool HttpPolicy::stageAfterCompletion(HttpOpRequest * op)
static const HttpStatus cant_connect(HttpStatus::EXT_CURL_EASY, CURLE_COULDNT_CONNECT);
static const HttpStatus cant_res_proxy(HttpStatus::EXT_CURL_EASY, CURLE_COULDNT_RESOLVE_PROXY);
static const HttpStatus cant_res_host(HttpStatus::EXT_CURL_EASY, CURLE_COULDNT_RESOLVE_HOST);
+ static const HttpStatus send_error(HttpStatus::EXT_CURL_EASY, CURLE_SEND_ERROR);
+ static const HttpStatus recv_error(HttpStatus::EXT_CURL_EASY, CURLE_RECV_ERROR);
// Retry or finalize
if (! op->mStatus)
@@ -313,7 +315,9 @@ bool HttpPolicy::stageAfterCompletion(HttpOpRequest * op)
((op->mStatus.isHttpStatus() && op->mStatus.mType >= 499 && op->mStatus.mType <= 599) ||
cant_connect == op->mStatus ||
cant_res_proxy == op->mStatus ||
- cant_res_host == op->mStatus))
+ cant_res_host == op->mStatus ||
+ send_error == op->mStatus ||
+ recv_error == op->mStatus))
{
// Okay, worth a retry. We include 499 in this test as
// it's the old 'who knows?' error from many grid services...