diff --git a/transport/src/main/java/io/netty/channel/socket/nio/NioSocketChannel.java b/transport/src/main/java/io/netty/channel/socket/nio/NioSocketChannel.java index dce79344b1..8db85304e6 100644 --- a/transport/src/main/java/io/netty/channel/socket/nio/NioSocketChannel.java +++ b/transport/src/main/java/io/netty/channel/socket/nio/NioSocketChannel.java @@ -332,7 +332,7 @@ public class NioSocketChannel extends AbstractNioByteChannel implements io.netty private final class NioSocketChannelUnsafe extends NioByteUnsafe { @Override protected Executor closeExecutor() { - if (config().getSoLinger() > 0) { + if (javaChannel().isOpen() && config().getSoLinger() > 0) { return GlobalEventExecutor.INSTANCE; } return null;