Removed old debug printf and improved disconnect()

This commit is contained in:
GideonLeGrange 2015-03-30 16:27:21 +02:00
parent afeeec67db
commit b02bf2eaee
1 changed files with 2 additions and 1 deletions

View File

@ -61,6 +61,8 @@ public final class ApiConnectionImpl extends ApiConnection {
processor.interrupt(); processor.interrupt();
reader.interrupt(); reader.interrupt();
try { try {
in.close();
out.close();
sock.close(); sock.close();
} catch (IOException ex) { } catch (IOException ex) {
throw new ApiConnectionException(String.format("Error closing socket: %s", ex.getMessage()), ex); throw new ApiConnectionException(String.format("Error closing socket: %s", ex.getMessage()), ex);
@ -322,7 +324,6 @@ public final class ApiConnectionImpl extends ApiConnection {
case "!halt": case "!halt":
return unpackError(); return unpackError();
case "": case "":
System.out.printf("sock.isClosed() = %s, sock.isInputShutdown() = %s\n", sock.isClosed(), sock.isInputShutdown());
default: default:
throw new ApiDataException(String.format("Unexpected line '%s'", line)); throw new ApiDataException(String.format("Unexpected line '%s'", line));
} }