Merge pull request #646 from AtKaaZ/patch1

server handler wasn't working due to field being overwritten in subclass
This commit is contained in:
Norman Maurer 2012-10-09 12:25:59 -07:00
commit 3a3e96acb8

View File

@ -58,7 +58,6 @@ public class ServerBootstrap extends AbstractBootstrap<ServerBootstrap> {
private final Map<ChannelOption<?>, Object> childOptions = new LinkedHashMap<ChannelOption<?>, Object>();
private EventLoopGroup childGroup;
private ChannelHandler handler;
private ChannelHandler childHandler;
/**
@ -153,8 +152,8 @@ public class ServerBootstrap extends AbstractBootstrap<ServerBootstrap> {
}
ChannelPipeline p = future.channel().pipeline();
if (handler != null) {
p.addLast(handler);
if (handler() != null) {
p.addLast(handler());
}
p.addLast(acceptor);