Fixed gameserver crash on authprovider error.

This commit is contained in:
Acrimon 2020-01-06 23:32:46 +01:00 committed by Marcel Märtens
parent 08b4cc5fc3
commit d3412d5493

View File

@ -127,12 +127,8 @@ impl<'a> System<'a> for Sys {
player,
token_or_username,
} if player.is_valid() => {
if !accounts
.query(token_or_username.clone())
.expect("Handle this error!")
{
// TODO: Graceful error handling!
// TODO: Graceful error handling! (e.g. AlreadyLoggedIn)
if !accounts.query(token_or_username.clone()).unwrap_or(false) {
// TO-DO: Set a less generic error here.
client.error_state(RequestStateError::Denied);
break;
}