From bc0a457e14912490e6e28fb489e4ee91888d2e5b Mon Sep 17 00:00:00 2001 From: rusefi Date: Wed, 8 Jul 2020 20:53:56 -0400 Subject: [PATCH] proxy progress --- .../src/main/java/com/rusefi/io/tcp/BinaryProtocolServer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java_console/io/src/main/java/com/rusefi/io/tcp/BinaryProtocolServer.java b/java_console/io/src/main/java/com/rusefi/io/tcp/BinaryProtocolServer.java index 411a285401..154756d45c 100644 --- a/java_console/io/src/main/java/com/rusefi/io/tcp/BinaryProtocolServer.java +++ b/java_console/io/src/main/java/com/rusefi/io/tcp/BinaryProtocolServer.java @@ -89,6 +89,7 @@ public class BinaryProtocolServer implements BinaryProtocolCommands { @SuppressWarnings("InfiniteLoopStatement") private void runProxy(LinkManager linkManager, Socket clientSocket) throws IOException { DataInputStream in = new DataInputStream(clientSocket.getInputStream()); + TcpIoStream stream = new TcpIoStream(logger, clientSocket); while (true) { byte first = in.readByte(); @@ -109,7 +110,6 @@ public class BinaryProtocolServer implements BinaryProtocolCommands { byte command = (byte) dis.read(); System.out.println("Got [" + (char) command + "/" + command + "] command"); - TcpIoStream stream = new TcpIoStream(logger, clientSocket); if (command == COMMAND_HELLO) { stream.sendPacket((TS_OK + Fields.TS_SIGNATURE).getBytes(), logger); } else if (command == COMMAND_PROTOCOL) {