summaryrefslogtreecommitdiff
path: root/indra/newview/llhttpretrypolicy.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2013-05-10 09:32:30 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2013-05-10 09:32:30 -0400
commit96a2173c643e145a6f5d4964282c4d43f0fc0c3e (patch)
tree8002b3725edb3a142a9824e60151df10df840910 /indra/newview/llhttpretrypolicy.cpp
parent43224062a64cc658d429e434a7b673fac0b7c012 (diff)
SH-4176 WIP - allow retries on 4xx errors if enabled by flag. So enable in the case of appearance requests.
Diffstat (limited to 'indra/newview/llhttpretrypolicy.cpp')
-rwxr-xr-xindra/newview/llhttpretrypolicy.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/indra/newview/llhttpretrypolicy.cpp b/indra/newview/llhttpretrypolicy.cpp
index 80d97e4362..1512b46103 100755
--- a/indra/newview/llhttpretrypolicy.cpp
+++ b/indra/newview/llhttpretrypolicy.cpp
@@ -28,11 +28,12 @@
#include "llhttpretrypolicy.h"
-LLAdaptiveRetryPolicy::LLAdaptiveRetryPolicy(F32 min_delay, F32 max_delay, F32 backoff_factor, U32 max_retries):
+LLAdaptiveRetryPolicy::LLAdaptiveRetryPolicy(F32 min_delay, F32 max_delay, F32 backoff_factor, U32 max_retries, bool retry_on_4xx):
mMinDelay(min_delay),
mMaxDelay(max_delay),
mBackoffFactor(backoff_factor),
- mMaxRetries(max_retries)
+ mMaxRetries(max_retries),
+ mRetryOn4xx(retry_on_4xx)
{
init();
}
@@ -108,7 +109,7 @@ void LLAdaptiveRetryPolicy::onFailureCommon(S32 status, bool has_retry_header_ti
llinfos << "Too many retries " << mRetryCount << ", will not retry" << llendl;
mShouldRetry = false;
}
- if (!isHttpServerErrorStatus(status))
+ if (!mRetryOn4xx && !isHttpServerErrorStatus(status))
{
llinfos << "Non-server error " << status << ", will not retry" << llendl;
mShouldRetry = false;