} finally {
established.set(false);
eventBus.unregister(this);
- logger.info("Closing Connection.");
+ logger.info(String.format("Closing Connection to %s:%d.", hostname, port));
try {
Closeables.close(connectionHandler, true);
} catch (IOException ioe1) {
return Optional.empty();
}
+ @Override
+ public String toString() {
+ return String.format("→ %s:%d", hostname, port);
+ }
+
/** Handles input and output for the connection. */
private class ConnectionHandler implements Closeable {