Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
ignore cancelled key exception as well
  • Loading branch information
kimchy committed Aug 23, 2012
1 parent 072fcaa commit 333293b
Showing 1 changed file with 4 additions and 3 deletions.
Expand Up @@ -57,6 +57,7 @@
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.SocketAddress;
import java.nio.channels.CancelledKeyException;
import java.util.*;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.CountDownLatch;
Expand Down Expand Up @@ -471,12 +472,12 @@ void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) throws Excepti
disconnectFromNode(entry.getKey());
}
}
} else if (isConnectException(e.getCause())) {
} else if (isConnectException(e.getCause()) || e.getCause() instanceof CancelledKeyException) {
if (logger.isTraceEnabled()) {
logger.trace("(Ignoring) Exception caught on netty layer [" + ctx.getChannel() + "]", e.getCause());
logger.trace("(Ignoring) exception caught on netty layer [" + ctx.getChannel() + "]", e.getCause());
}
} else {
logger.warn("Exception caught on netty layer [" + ctx.getChannel() + "]", e.getCause());
logger.warn("exception caught on netty layer [" + ctx.getChannel() + "]", e.getCause());
}
}

Expand Down

0 comments on commit 333293b

Please sign in to comment.