Fixed issue: NETTY-331 (Regression NETTY-262: Server bootstrap bound channel pipeline has become immutable)
* ServerBootstrap now always uses the default pipeline instead of the static one
This commit is contained in:
parent
1c6813a06d
commit
e36d2dc3de
@ -41,7 +41,6 @@ import org.jboss.netty.channel.ChildChannelStateEvent;
|
||||
import org.jboss.netty.channel.ExceptionEvent;
|
||||
import org.jboss.netty.channel.ServerChannelFactory;
|
||||
import org.jboss.netty.channel.SimpleChannelUpstreamHandler;
|
||||
import org.jboss.netty.channel.StaticChannelPipeline;
|
||||
|
||||
/**
|
||||
* A helper class which creates a new server-side {@link Channel} and accepts
|
||||
@ -271,15 +270,13 @@ public class ServerBootstrap extends Bootstrap {
|
||||
final BlockingQueue<ChannelFuture> futureQueue =
|
||||
new LinkedBlockingQueue<ChannelFuture>();
|
||||
|
||||
ChannelPipeline bossPipeline;
|
||||
ChannelHandler binder = new Binder(localAddress, futureQueue);
|
||||
ChannelHandler parentHandler = getParentHandler();
|
||||
|
||||
ChannelPipeline bossPipeline = pipeline();
|
||||
bossPipeline.addLast("binder", binder);
|
||||
if (parentHandler != null) {
|
||||
bossPipeline = pipeline();
|
||||
bossPipeline.addLast("binder", binder);
|
||||
bossPipeline.addLast("userHandler", parentHandler);
|
||||
} else {
|
||||
bossPipeline = new StaticChannelPipeline(binder);
|
||||
}
|
||||
|
||||
Channel channel = getFactory().newChannel(bossPipeline);
|
||||
|
Loading…
Reference in New Issue
Block a user