summaryrefslogtreecommitdiff
path: root/indra/newview/lllogininstance.cpp
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2019-05-08 00:09:53 +0300
committerAndreyL ProductEngine <alihatskiy@productengine.com>2019-05-08 00:09:53 +0300
commitaefb0503aa199c6dfd383fe7b23cd129960dc1be (patch)
treeb47e51ddb4d20799897377345334bb3f925ac4d6 /indra/newview/lllogininstance.cpp
parent964afabae667c55ccb2d7051e6a6793773b025e0 (diff)
parent34322f8f37380df868703051230f2a4109602b3f (diff)
Merged in lindenlab/viewer-release
Diffstat (limited to 'indra/newview/lllogininstance.cpp')
-rw-r--r--indra/newview/lllogininstance.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index df040d8f13..8a69acb8dc 100644
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -63,6 +63,9 @@
#include <sstream>
const S32 LOGIN_MAX_RETRIES = 3;
+const F32 LOGIN_SRV_TIMEOUT_MIN = 10;
+const F32 LOGIN_SRV_TIMEOUT_MAX = 120;
+const F32 LOGIN_DNS_TIMEOUT_FACTOR = 0.9; // make DNS wait shorter then retry time
class LLLoginInstance::Disposable {
public:
@@ -237,8 +240,10 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia
// Specify desired timeout/retry options
LLSD http_params;
- http_params["timeout"] = gSavedSettings.getF32("LoginSRVTimeout");
+ F32 srv_timeout = llclamp(gSavedSettings.getF32("LoginSRVTimeout"), LOGIN_SRV_TIMEOUT_MIN, LOGIN_SRV_TIMEOUT_MAX);
+ http_params["timeout"] = srv_timeout;
http_params["retries"] = LOGIN_MAX_RETRIES;
+ http_params["DNSCacheTimeout"] = srv_timeout * LOGIN_DNS_TIMEOUT_FACTOR; //Default: indefinite
mRequestData.clear();
mRequestData["method"] = "login_to_simulator";