diff options
| author | Nat Goodspeed <nat@lindenlab.com> | 2019-04-26 11:17:53 -0400 |
|---|---|---|
| committer | Nat Goodspeed <nat@lindenlab.com> | 2019-04-26 11:17:53 -0400 |
| commit | 0d596aa4de2f583862274350ce6287c0ed8c2bec (patch) | |
| tree | 90a6ca5b29d5c99b585233d059e16dccc23a2e19 /indra/newview/lllogininstance.cpp | |
| parent | 70aa89f708254c47766f4629e9131ea492829129 (diff) | |
| parent | 85b431d5137886927efef35ca558bc8a998a5212 (diff) | |
Automated merge with file:///Users/nat/linden/viewer-gridselect
Diffstat (limited to 'indra/newview/lllogininstance.cpp')
| -rw-r--r-- | indra/newview/lllogininstance.cpp | 7 |
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"; |
