From 3feb92046ff226c6d65a90ae948a0390e768ed48 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 24 Mar 2022 18:47:08 +0200 Subject: SL-16831 Viewer stalls for 10 seconds before displaying a login failure # Conflicts: # indra/newview/llstartup.cpp --- indra/viewer_components/login/lllogin.cpp | 37 ++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 11 deletions(-) (limited to 'indra/viewer_components') diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp index 168880dc12..5d50d1e182 100644 --- a/indra/viewer_components/login/lllogin.cpp +++ b/indra/viewer_components/login/lllogin.cpp @@ -251,20 +251,35 @@ 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(); + // Timeout should produce the isUndefined() object passed here. + if (reason_response == "update") + { + LL_INFOS("LLLogin") << "Login failure, waiting for sync from updater" << LL_ENDL; + updater = llcoro::suspendUntilEventOnWithTimeout(sSyncPoint, 10, LLSD()); + } + else + { + LL_DEBUGS("LLLogin") << "Login failure, waiting for sync from updater" << LL_ENDL; + updater = llcoro::suspendUntilEventOnWithTimeout(sSyncPoint, 3, 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); } -- cgit v1.2.3 From efb9df04c3899c269f0c17d2473b4472d5f31ee5 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 15 Apr 2022 20:53:21 +0300 Subject: SL-16831 Don't wait for an updater on login failure unles it's the cause of failure --- indra/viewer_components/login/lllogin.cpp | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) (limited to 'indra/viewer_components') diff --git a/indra/viewer_components/login/lllogin.cpp b/indra/viewer_components/login/lllogin.cpp index 5d50d1e182..8a7e6407ed 100644 --- a/indra/viewer_components/login/lllogin.cpp +++ b/indra/viewer_components/login/lllogin.cpp @@ -257,25 +257,21 @@ void LLLogin::Impl::loginCoro(std::string uri, LLSD login_params) if (printable_params["wait_for_updater"].asBoolean()) { std::string reason_response = responses["data"]["reason"].asString(); - // Timeout should produce the isUndefined() object passed here. - if (reason_response == "update") + 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()); - } - else - { - LL_DEBUGS("LLLogin") << "Login failure, waiting for sync from updater" << LL_ENDL; - updater = llcoro::suspendUntilEventOnWithTimeout(sSyncPoint, 3, 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; + + 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; + } } } -- cgit v1.2.3