Cleanup logging

This commit is contained in:
Florian Reimair 2020-03-26 16:59:42 +01:00
parent c588b19074
commit 4ff4801e5c
No known key found for this signature in database
GPG Key ID: 05634D8D7A7954C8
2 changed files with 5 additions and 1 deletions

View File

@ -627,6 +627,10 @@ public class Connection implements HasCapabilities, Runnable, MessageListener {
private void handleException(Throwable e) {
CloseConnectionReason closeConnectionReason;
// silent fail if we are shutdown
if (stopped)
return;
if (e instanceof SocketException) {
if (socket.isClosed())
closeConnectionReason = CloseConnectionReason.SOCKET_CLOSED;

View File

@ -225,7 +225,7 @@ public abstract class NetworkNode implements MessageListener {
}
public void onFailure(@NotNull Throwable throwable) {
log.info("onFailure at sendMessage: peersNodeAddress={}\n\tmessage={}\n\tthrowable={}", peersNodeAddress, networkEnvelope.getClass().getSimpleName(), throwable.toString());
log.debug("onFailure at sendMessage: peersNodeAddress={}\n\tmessage={}\n\tthrowable={}", peersNodeAddress, networkEnvelope.getClass().getSimpleName(), throwable.toString());
UserThread.execute(() -> resultFuture.setException(throwable));
}
});