3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-02-07 06:44:16 +00:00

Try slightly more useful error log in NioClientManager.handleKey whilst still keeping it concise.

This commit is contained in:
Mike Hearn 2014-09-17 13:15:27 +02:00
parent 325cc3e8fa
commit d94d5bee8e

View File

@ -67,7 +67,8 @@ public class NioClientManager extends AbstractExecutionThreadService implements
// If e is a CancelledKeyException, there is a race to get to interestOps after finishConnect() which
// may cause this. Otherwise it may be any arbitrary kind of connection failure.
// Calling sc.socket().getRemoteSocketAddress() here throws an exception, so we can only log the error itself
log.error("Failed to connect with exception: {}", Throwables.getRootCause(e).getMessage());
Throwable cause = Throwables.getRootCause(e);
log.error("Failed to connect with exception: {}: {}", cause.getClass().getName(), cause.getMessage());
handler.closeConnection();
}
} else // Process bytes read