From 8ba8b6916ee9994a9d53a70ee92464461a1b816f Mon Sep 17 00:00:00 2001 From: rusefi Date: Thu, 1 Oct 2020 00:51:12 -0400 Subject: [PATCH] better logging --- .../src/main/java/com/rusefi/binaryprotocol/BinaryProtocol.java | 2 +- .../proxy_server/src/main/java/com/rusefi/server/Backend.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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());