From 002c99e751ec24e80236a310bd46e0098bdb636d Mon Sep 17 00:00:00 2001 From: Scott Mitchell Date: Mon, 5 Dec 2016 08:50:30 -0800 Subject: [PATCH] NIO ServerChannel shouldn't close because of Exception Motivation: e102a008b63d0063581ba242539f0a8d473cae00 changed a conditional where previously the NIO ServerChannel would not be closed in the event of an exception. Modifications: - Restore the logic prior to e102a008b63d0063581ba242539f0a8d473cae00 which does not automatically close ServerChannels for IOExceptions Result: NIO ServerChannel doesn't close automatically for an IOException. --- .../java/io/netty/channel/nio/AbstractNioMessageChannel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transport/src/main/java/io/netty/channel/nio/AbstractNioMessageChannel.java b/transport/src/main/java/io/netty/channel/nio/AbstractNioMessageChannel.java index 7e2691e789..c1a163ea19 100644 --- a/transport/src/main/java/io/netty/channel/nio/AbstractNioMessageChannel.java +++ b/transport/src/main/java/io/netty/channel/nio/AbstractNioMessageChannel.java @@ -176,7 +176,7 @@ public abstract class AbstractNioMessageChannel extends AbstractNioChannel { // accepting incoming connections. (e.g. too many open files) return cause instanceof IOException && !(cause instanceof PortUnreachableException) && - this instanceof ServerChannel; + !(this instanceof ServerChannel); } /**