summaryrefslogtreecommitdiff
path: root/indra/viewer_components/login/lllogin.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2022-05-04 18:51:05 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2022-05-04 18:51:05 +0300
commit7fff7eecb6de318e9547ab816308897ced077c48 (patch)
tree08cf159322c4a4e120d4ba3e00a6e382fb37c2a7 /indra/viewer_components/login/lllogin.cpp
parentfb4aab3144577d35e65d437d105c8c531d49e585 (diff)
parentbc7e2fb7e7f7527b522bdf6f4c791f3b660485e2 (diff)
Merge branch 'master' into DRTVWR-543-maint
Diffstat (limited to 'indra/viewer_components/login/lllogin.cpp')
-rw-r--r--indra/viewer_components/login/lllogin.cpp33
1 files changed, 22 insertions, 11 deletions
diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp
index 168880dc12..8a7e6407ed 100644
--- a/indra/viewer_components/login/lllogin.cpp
+++ b/indra/viewer_components/login/lllogin.cpp
@@ -251,20 +251,31 @@ void LLLogin::Impl::loginCoro(std::string uri, LLSD login_params)
// Since sSyncPoint is an LLEventMailDrop, we DEFINITELY want to
// consume the posted event.
LLCoros::OverrideConsuming oc(true);
- // Timeout should produce the isUndefined() object passed here.
- LL_DEBUGS("LLLogin") << "Login failure, waiting for sync from updater" << LL_ENDL;
- LLSD updater = llcoro::suspendUntilEventOnWithTimeout(sSyncPoint, 10, LLSD());
- if (updater.isUndefined())
- {
- LL_WARNS("LLLogin") << "Failed to hear from updater, proceeding with fail.login"
- << LL_ENDL;
- }
- else
+ LLSD responses(mAuthResponse["responses"]);
+ LLSD updater;
+
+ if (printable_params["wait_for_updater"].asBoolean())
{
- LL_DEBUGS("LLLogin") << "Got responses from updater and login.cgi" << LL_ENDL;
+ std::string reason_response = responses["data"]["reason"].asString();
+ if (reason_response == "update") // No point waiting if not an update
+ {
+ // Timeout should produce the isUndefined() object passed here.
+ LL_INFOS("LLLogin") << "Login failure, waiting for sync from updater" << LL_ENDL;
+ updater = llcoro::suspendUntilEventOnWithTimeout(sSyncPoint, 10, LLSD());
+
+ if (updater.isUndefined())
+ {
+ LL_WARNS("LLLogin") << "Failed to hear from updater, proceeding with fail.login"
+ << LL_ENDL;
+ }
+ else
+ {
+ LL_DEBUGS("LLLogin") << "Got responses from updater and login.cgi" << LL_ENDL;
+ }
+ }
}
+
// Let the fail.login handler deal with empty updater response.
- LLSD responses(mAuthResponse["responses"]);
responses["updater"] = updater;
sendProgressEvent("offline", "fail.login", responses);
}