diff --git a/transport-native-epoll/src/main/java/io/netty/channel/epoll/EpollServerSocketChannel.java b/transport-native-epoll/src/main/java/io/netty/channel/epoll/EpollServerSocketChannel.java index 4a9cebd38d..390ca3d0e8 100644 --- a/transport-native-epoll/src/main/java/io/netty/channel/epoll/EpollServerSocketChannel.java +++ b/transport-native-epoll/src/main/java/io/netty/channel/epoll/EpollServerSocketChannel.java @@ -123,7 +123,7 @@ public final class EpollServerSocketChannel extends AbstractEpollChannel impleme // * The user called Channel.read() or ChannelHandlerContext.read() in channelReadComplete(...) method // // See https://github.com/netty/netty/issues/2254 - if (config.isAutoRead() && !readPending) { + if (!config.isAutoRead() && !readPending) { clearEpollIn(); } } diff --git a/transport-native-epoll/src/main/java/io/netty/channel/epoll/EpollSocketChannel.java b/transport-native-epoll/src/main/java/io/netty/channel/epoll/EpollSocketChannel.java index 96e21e835a..930c26d7a1 100644 --- a/transport-native-epoll/src/main/java/io/netty/channel/epoll/EpollSocketChannel.java +++ b/transport-native-epoll/src/main/java/io/netty/channel/epoll/EpollSocketChannel.java @@ -608,7 +608,7 @@ public final class EpollSocketChannel extends AbstractEpollChannel implements So // * The user called Channel.read() or ChannelHandlerContext.read() in channelReadComplete(...) method // // See https://github.com/netty/netty/issues/2254 - if (config.isAutoRead() && !readPending) { + if (!config.isAutoRead() && !readPending) { clearEpollIn(); } } diff --git a/transport/src/main/java/io/netty/channel/nio/AbstractNioByteChannel.java b/transport/src/main/java/io/netty/channel/nio/AbstractNioByteChannel.java index 1c0c4b5f60..e9af3ffb0e 100644 --- a/transport/src/main/java/io/netty/channel/nio/AbstractNioByteChannel.java +++ b/transport/src/main/java/io/netty/channel/nio/AbstractNioByteChannel.java @@ -152,7 +152,7 @@ public abstract class AbstractNioByteChannel extends AbstractNioChannel { // * The user called Channel.read() or ChannelHandlerContext.read() in channelReadComplete(...) method // // See https://github.com/netty/netty/issues/2254 - if (config.isAutoRead() && !readPending) { + if (!config.isAutoRead() && !readPending) { removeReadOp(); } } 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 d96200de50..47581cc698 100644 --- a/transport/src/main/java/io/netty/channel/nio/AbstractNioMessageChannel.java +++ b/transport/src/main/java/io/netty/channel/nio/AbstractNioMessageChannel.java @@ -112,7 +112,7 @@ public abstract class AbstractNioMessageChannel extends AbstractNioChannel { // * The user called Channel.read() or ChannelHandlerContext.read() in channelReadComplete(...) method // // See https://github.com/netty/netty/issues/2254 - if (config.isAutoRead() && !readPending) { + if (!config.isAutoRead() && !readPending) { removeReadOp(); } }