mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Fail fast when auth TCP disconnects during authentication
This commit is contained in:
parent
9091cb0496
commit
b3001a4b5b
1 changed files with 11 additions and 0 deletions
|
|
@ -433,6 +433,17 @@ void AuthHandler::update(float /*deltaTime*/) {
|
|||
|
||||
// Update socket (processes incoming data and calls packet callback)
|
||||
socket->update();
|
||||
|
||||
// If the server drops the TCP connection mid-auth, surface it as an auth failure immediately
|
||||
// (otherwise the UI just hits its generic timeout).
|
||||
if (!socket->isConnected()) {
|
||||
if (state != AuthState::DISCONNECTED &&
|
||||
state != AuthState::FAILED &&
|
||||
state != AuthState::AUTHENTICATED &&
|
||||
state != AuthState::REALM_LIST_RECEIVED) {
|
||||
fail("Disconnected by auth server");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void AuthHandler::setState(AuthState newState) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue