mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-24 16:10:14 +00:00
Auth: de-spam realm list requests in UI-driven flow
This commit is contained in:
parent
81e082dc46
commit
bb7d1d7d85
1 changed files with 6 additions and 1 deletions
|
|
@ -73,7 +73,12 @@ void AuthHandler::requestRealmList() {
|
|||
return;
|
||||
}
|
||||
|
||||
if (state != AuthState::AUTHENTICATED) {
|
||||
// Allow callers (UI) to be dumb and call this repeatedly; we gate on state.
|
||||
// After auth success we may already be in REALM_LIST_REQUESTED / REALM_LIST_RECEIVED.
|
||||
if (state == AuthState::REALM_LIST_REQUESTED) {
|
||||
return;
|
||||
}
|
||||
if (state != AuthState::AUTHENTICATED && state != AuthState::REALM_LIST_RECEIVED) {
|
||||
LOG_ERROR("Cannot request realm list: not authenticated (state: ", (int)state, ")");
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue