diff --git a/java_console/io/src/main/java/com/rusefi/binaryprotocol/BinaryProtocol.java b/java_console/io/src/main/java/com/rusefi/binaryprotocol/BinaryProtocol.java index 2cff9968c8..3c25f35cd3 100644 --- a/java_console/io/src/main/java/com/rusefi/binaryprotocol/BinaryProtocol.java +++ b/java_console/io/src/main/java/com/rusefi/binaryprotocol/BinaryProtocol.java @@ -394,7 +394,7 @@ public class BinaryProtocol implements BinaryProtocolCommands { } private static String getCode(byte[] response) { - int b = response[0]; + int b = response[0] & 0xff; switch (b) { case TS_RESPONSE_CRC_FAILURE: return "CRC_FAILURE"; diff --git a/java_tools/proxy_server/src/main/java/com/rusefi/server/Backend.java b/java_tools/proxy_server/src/main/java/com/rusefi/server/Backend.java index 9d497f2b18..e75d5115a0 100644 --- a/java_tools/proxy_server/src/main/java/com/rusefi/server/Backend.java +++ b/java_tools/proxy_server/src/main/java/com/rusefi/server/Backend.java @@ -373,6 +373,7 @@ public class Backend implements Closeable { public void close(ControllerConnectionState inactiveClient) { inactiveClient.close(); + log.info("Closing " + inactiveClient); synchronized (lock) { // in case of exception in the initialization phase we do not even add client into the the collection controllersByKey.remove(inactiveClient.getControllerKey());