Pass authentication errors to disconnect.

This commit is contained in:
Steven Smith 2015-07-22 11:07:37 -07:00
parent d29c5f3418
commit 2ed6e1e1e8

View file

@ -58,13 +58,13 @@ public class ClientListener extends SessionAdapter {
try { try {
new SessionService(proxy).joinServer(profile, accessToken, serverHash); new SessionService(proxy).joinServer(profile, accessToken, serverHash);
} catch(AuthenticationUnavailableException e) { } catch(AuthenticationUnavailableException e) {
event.getSession().disconnect("Login failed: Authentication service unavailable."); event.getSession().disconnect("Login failed: Authentication service unavailable.", e);
return; return;
} catch(InvalidCredentialsException e) { } catch(InvalidCredentialsException e) {
event.getSession().disconnect("Login failed: Invalid login session."); event.getSession().disconnect("Login failed: Invalid login session.", e);
return; return;
} catch(AuthenticationException e) { } catch(AuthenticationException e) {
event.getSession().disconnect("Login failed: Authentication error: " + e.getMessage()); event.getSession().disconnect("Login failed: Authentication error: " + e.getMessage(), e);
return; return;
} }