From e4bb886d64ca01200ab02aca3b4fd5cb8d4d9a46 Mon Sep 17 00:00:00 2001 From: Manevolent Date: Fri, 27 Jul 2018 16:12:06 -0400 Subject: [PATCH] Set state to connected. We may want an interim state for this step of the protocol. --- .../packet/handler/local/LocalClientHandlerConnecting.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/github/manevolent/ts3j/protocol/packet/handler/local/LocalClientHandlerConnecting.java b/src/main/java/com/github/manevolent/ts3j/protocol/packet/handler/local/LocalClientHandlerConnecting.java index 26279d7..14b522f 100644 --- a/src/main/java/com/github/manevolent/ts3j/protocol/packet/handler/local/LocalClientHandlerConnecting.java +++ b/src/main/java/com/github/manevolent/ts3j/protocol/packet/handler/local/LocalClientHandlerConnecting.java @@ -143,13 +143,9 @@ public class LocalClientHandlerConnecting extends LocalClientHandler { } else if (packet.getBody() instanceof PacketBody2Command) { SimpleCommand command = ((PacketBody2Command) packet.getBody()).parse(); - Ts3Debugging.debug(command.build()); - if (command.getName().equalsIgnoreCase("initivexpand2")) { // 3.2.2 initivexpand2 (Client <- Server) - Ts3Debugging.debug(command.build()); - if (!command.get("ot").getValue().equals("1")) throw new IllegalArgumentException("ot constant != 1: " + command.get("ot").getValue()); @@ -231,6 +227,8 @@ public class LocalClientHandlerConnecting extends LocalClientHandler { ) ) ); + + getClient().setState(ClientConnectionState.CONNECTED); } else if (command.getName().equals("error")) { getClient().setState(ClientConnectionState.DISCONNECTED);