Fix DefaultChannelPipeline.first() so that it returns null when only the sentinel handlers remain (this is how DefaultChannelPipeline.last() works already)
This commit is contained in:
parent
2ffa083d3c
commit
3f8a830963
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user