From 2ed6e1e1e85833333cd89b047fafee5650457d26 Mon Sep 17 00:00:00 2001 From: Steven Smith Date: Wed, 22 Jul 2015 11:07:37 -0700 Subject: [PATCH] Pass authentication errors to disconnect. --- src/main/java/org/spacehq/mc/protocol/ClientListener.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/spacehq/mc/protocol/ClientListener.java b/src/main/java/org/spacehq/mc/protocol/ClientListener.java index 5fcb6696..7babe894 100644 --- a/src/main/java/org/spacehq/mc/protocol/ClientListener.java +++ b/src/main/java/org/spacehq/mc/protocol/ClientListener.java @@ -58,13 +58,13 @@ public class ClientListener extends SessionAdapter { try { new SessionService(proxy).joinServer(profile, accessToken, serverHash); } catch(AuthenticationUnavailableException e) { - event.getSession().disconnect("Login failed: Authentication service unavailable."); + event.getSession().disconnect("Login failed: Authentication service unavailable.", e); return; } catch(InvalidCredentialsException e) { - event.getSession().disconnect("Login failed: Invalid login session."); + event.getSession().disconnect("Login failed: Invalid login session.", e); return; } catch(AuthenticationException e) { - event.getSession().disconnect("Login failed: Authentication error: " + e.getMessage()); + event.getSession().disconnect("Login failed: Authentication error: " + e.getMessage(), e); return; }