mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-03-14 03:48:28 +01:00
NioClientManager: reduce log for IOException
* log without stacktrace * reduce log level to info
This commit is contained in:
parent
f59e6ce118
commit
26726f4648
1 changed files with 4 additions and 1 deletions
|
@ -88,7 +88,10 @@ public class NioClientManager extends AbstractExecutionThreadService implements
|
|||
// 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
|
||||
Throwable cause = Throwables.getRootCause(e);
|
||||
log.warn("Failed to connect with exception: {}: {}", cause.getClass().getName(), cause.getMessage(), e);
|
||||
if (cause instanceof IOException)
|
||||
log.info("Failed to connect: {}: {}", cause.getClass().getName(), cause.getMessage());
|
||||
else
|
||||
log.warn("Failed to connect: {}: {}", cause.getClass().getName(), cause.getMessage(), e);
|
||||
handler.closeConnection();
|
||||
data.future.completeExceptionally(cause);
|
||||
data.future = null;
|
||||
|
|
Loading…
Add table
Reference in a new issue