From 8a35a9aad3d5a985ee1becb723f960ae1c7ba079 Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Thu, 6 Aug 2009 11:09:54 +0000 Subject: [PATCH] Fixed issue: NETTY-205 Unnecessary exception log on early disconnection * Do not log ClosedChannelException in RegisterTask.run() --- .../java/org/jboss/netty/channel/socket/nio/NioWorker.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/jboss/netty/channel/socket/nio/NioWorker.java b/src/main/java/org/jboss/netty/channel/socket/nio/NioWorker.java index 3503d9d17a..f9910062ab 100644 --- a/src/main/java/org/jboss/netty/channel/socket/nio/NioWorker.java +++ b/src/main/java/org/jboss/netty/channel/socket/nio/NioWorker.java @@ -751,8 +751,10 @@ class NioWorker implements Runnable { future.setFailure(e); } close(channel, succeededFuture(channel)); - throw new ChannelException( - "Failed to register a socket to the selector.", e); + if (!(e instanceof ClosedChannelException)) { + throw new ChannelException( + "Failed to register a socket to the selector.", e); + } } if (!server) {