diff options
| author | andreykproductengine <andreykproductengine@lindenlab.com> | 2019-01-29 21:33:31 +0200 |
|---|---|---|
| committer | andreykproductengine <andreykproductengine@lindenlab.com> | 2019-01-29 21:33:31 +0200 |
| commit | d785c87d620cb17681ea6d3011461154d96ab9d5 (patch) | |
| tree | ab13068b53075fe675579af9a74bac963842a459 /indra/newview/lllogininstance.cpp | |
| parent | 8a92a771ba547d9d6a8bd1234e2e0b144a8bfcf5 (diff) | |
SL-2364 Fixed Viewer Caches Login Host DNS Entries Indefinetely
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 bc93fa2c20..bf4fc029ee 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: @@ -232,8 +235,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"; |
