From 468ff01f9fa7e79ec0123a61ee334899115df95c Mon Sep 17 00:00:00 2001 From: Gravit Date: Wed, 3 Apr 2019 22:37:05 +0700 Subject: [PATCH] =?UTF-8?q?[FIX]=20=D0=A4=D0=B8=D0=BA=D1=81=20JoinServerRe?= =?UTF-8?q?quest?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../socket/websocket/json/auth/JoinServerResponse.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/json/auth/JoinServerResponse.java b/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/json/auth/JoinServerResponse.java index 42d99354..e676ffd0 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/json/auth/JoinServerResponse.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/json/auth/JoinServerResponse.java @@ -3,6 +3,7 @@ import io.netty.channel.ChannelHandlerContext; import ru.gravit.launcher.events.request.ErrorRequestEvent; import ru.gravit.launcher.events.request.JoinServerRequestEvent; +import ru.gravit.launchserver.LaunchServer; import ru.gravit.launchserver.auth.AuthException; import ru.gravit.launchserver.socket.Client; import ru.gravit.launchserver.socket.websocket.WebSocketService; @@ -23,7 +24,12 @@ public String getType() { public void execute(WebSocketService service, ChannelHandlerContext ctx, Client client) { boolean success; try { - success = client.auth.handler.joinServer(username, accessToken, serverID); + if(client.auth == null) + { + LogHelper.warning("Client auth is null. Using default."); + success = LaunchServer.server.config.getAuthProviderPair().handler.joinServer(username, accessToken, serverID); + } + else success = client.auth.handler.joinServer(username, accessToken, serverID); } catch (AuthException e) { service.sendObject(ctx, new ErrorRequestEvent(e.getMessage())); return;