From 9346755b394f733b78c8f0d1acab26fb78b80cb7 Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Fri, 8 Nov 2013 14:41:36 +0100 Subject: [PATCH] don't log Connection reset by peer --- .../src/org/jetbrains/io/ChannelExceptionHandler.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platform/platform-impl/src/org/jetbrains/io/ChannelExceptionHandler.java b/platform/platform-impl/src/org/jetbrains/io/ChannelExceptionHandler.java index 54ba57f66ad3..949453dc9740 100644 --- a/platform/platform-impl/src/org/jetbrains/io/ChannelExceptionHandler.java +++ b/platform/platform-impl/src/org/jetbrains/io/ChannelExceptionHandler.java @@ -40,11 +40,11 @@ public final class ChannelExceptionHandler extends ChannelInboundHandlerAdapter public void exceptionCaught(ChannelHandlerContext context, Throwable cause) throws Exception { // don't report about errors while connecting // WEB-7727 - if (!(cause instanceof ConnectException) && !"Connection reset".equals(cause.getMessage())) { - NettyUtil.log(cause, LOG); + if (cause instanceof ConnectException || (cause.getMessage() != null && cause.getMessage().startsWith("Connection reset"))) { + LOG.debug(cause); } else { - LOG.debug(cause); + NettyUtil.log(cause, LOG); } } } \ No newline at end of file