diff --git a/transport/src/main/java/io/netty/channel/DefaultChannelPipeline.java b/transport/src/main/java/io/netty/channel/DefaultChannelPipeline.java index 3efe734423..6697f13fff 100755 --- a/transport/src/main/java/io/netty/channel/DefaultChannelPipeline.java +++ b/transport/src/main/java/io/netty/channel/DefaultChannelPipeline.java @@ -751,7 +751,7 @@ final class DefaultChannelPipeline implements ChannelPipeline { @Override public ChannelHandler first() { DefaultChannelHandlerContext first = head.next; - if (first == null) { + if (first == head) { return null; } return first.handler();