Don't try to connect to the remote server with invalid credentials

Fixes #2458
This commit is contained in:
Camotoy 2021-08-12 14:35:26 -04:00
parent e20247b6d6
commit 919e84c23f
No known key found for this signature in database
GPG key ID: 7EEFB66FE798081F

View file

@ -590,9 +590,17 @@ public class GeyserSession implements CommandSender {
disconnect(LanguageUtils.getPlayerLocaleString("geyser.auth.login.invalid.kick", getClientData().getLanguageCode())); disconnect(LanguageUtils.getPlayerLocaleString("geyser.auth.login.invalid.kick", getClientData().getLanguageCode()));
} catch (RequestException ex) { } catch (RequestException ex) {
ex.printStackTrace(); ex.printStackTrace();
disconnect(ex.getMessage());
} }
return null; return null;
}).whenComplete((aVoid, ex) -> connectDownstream()); }).whenComplete((aVoid, ex) -> {
if (this.closed) {
// Client disconnected during the authentication attempt
return;
}
connectDownstream();
});
} }
/** /**