From 92e28bb51672652caca7da25a1febbe2c0b472bf Mon Sep 17 00:00:00 2001 From: Mike Hearn Date: Thu, 18 Dec 2014 14:17:04 +0100 Subject: [PATCH] Quieter logging in ConnectionHandler --- core/src/main/java/org/bitcoinj/net/ConnectionHandler.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/org/bitcoinj/net/ConnectionHandler.java b/core/src/main/java/org/bitcoinj/net/ConnectionHandler.java index 891126e5..6855a6a8 100644 --- a/core/src/main/java/org/bitcoinj/net/ConnectionHandler.java +++ b/core/src/main/java/org/bitcoinj/net/ConnectionHandler.java @@ -151,12 +151,12 @@ class ConnectionHandler implements MessageWriteTarget { setWriteOps(); } catch (IOException e) { lock.unlock(); - log.error("Error writing message to connection, closing connection", e); + log.warn("Error writing message to connection, closing connection", e); closeConnection(); throw e; } catch (CancelledKeyException e) { lock.unlock(); - log.error("Error writing message to connection, closing connection", e); + log.warn("Error writing message to connection, closing connection", e); closeConnection(); throw new IOException(e); } @@ -226,7 +226,7 @@ class ConnectionHandler implements MessageWriteTarget { // This can happen eg if the channel closes while the thread is about to get killed // (ClosedByInterruptException), or if handler.parser.receiveBytes throws something Throwable t = Throwables.getRootCause(e); - log.error("Error handling SelectionKey: {}", t.getMessage() != null ? t.getMessage() : t.getClass().getName()); + log.warn("Error handling SelectionKey: {}", t.getMessage() != null ? t.getMessage() : t.getClass().getName()); handler.closeConnection(); } }