better logging

This commit is contained in:
rusefi 2020-10-01 00:51:12 -04:00
parent 75c5df0a4e
commit 8ba8b6916e
2 changed files with 2 additions and 1 deletions

View File

@ -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";

View File

@ -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());