If parentHandler is specified, ServerBootstrap should not use StaticChannelPipeline because the parentHandler might want to manipulate the pipeline
This commit is contained in:
parent
64f0a931a4
commit
eb575430c2
@ -269,7 +269,9 @@ public class ServerBootstrap extends Bootstrap {
|
||||
ChannelHandler binder = new Binder(localAddress, futureQueue);
|
||||
ChannelHandler parentHandler = getParentHandler();
|
||||
if (parentHandler != null) {
|
||||
bossPipeline = new StaticChannelPipeline(binder, parentHandler);
|
||||
bossPipeline = pipeline();
|
||||
bossPipeline.addLast("binder", binder);
|
||||
bossPipeline.addLast("userHandler", parentHandler);
|
||||
} else {
|
||||
bossPipeline = new StaticChannelPipeline(binder);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user