Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "Skip from the surefire execution plugins that can step over guava feet"
[controller.git]
/
opendaylight
/
commons
/
protocol-framework
/
src
/
main
/
java
/
org
/
opendaylight
/
protocol
/
framework
/
AbstractDispatcher.java
diff --git
a/opendaylight/commons/protocol-framework/src/main/java/org/opendaylight/protocol/framework/AbstractDispatcher.java
b/opendaylight/commons/protocol-framework/src/main/java/org/opendaylight/protocol/framework/AbstractDispatcher.java
index 5e55cddf8e766509336041264dcecd7af06a2932..916ef9a88befa87ac8b5c17902ec6d970f23807d 100644
(file)
--- a/
opendaylight/commons/protocol-framework/src/main/java/org/opendaylight/protocol/framework/AbstractDispatcher.java
+++ b/
opendaylight/commons/protocol-framework/src/main/java/org/opendaylight/protocol/framework/AbstractDispatcher.java
@@
-77,9
+77,6
@@
public abstract class AbstractDispatcher<S extends ProtocolSession<?>, L extends
*/
protected ChannelFuture createServer(final InetSocketAddress address, final PipelineInitializer<S> initializer) {
final ServerBootstrap b = new ServerBootstrap();
*/
protected ChannelFuture createServer(final InetSocketAddress address, final PipelineInitializer<S> initializer) {
final ServerBootstrap b = new ServerBootstrap();
- b.group(this.bossGroup, this.workerGroup);
- b.channel(NioServerSocketChannel.class);
- b.option(ChannelOption.SO_BACKLOG, 128);
b.childHandler(new ChannelInitializer<SocketChannel>() {
@Override
b.childHandler(new ChannelInitializer<SocketChannel>() {
@Override
@@
-87,10
+84,20
@@
public abstract class AbstractDispatcher<S extends ProtocolSession<?>, L extends
initializer.initializeChannel(ch, new DefaultPromise<S>(executor));
}
});
initializer.initializeChannel(ch, new DefaultPromise<S>(executor));
}
});
- b.childOption(ChannelOption.SO_KEEPALIVE, true);
+ b.option(ChannelOption.SO_BACKLOG, 128);
+ b.childOption(ChannelOption.SO_KEEPALIVE, true);
customizeBootstrap(b);
customizeBootstrap(b);
+ if (b.group() == null) {
+ b.group(bossGroup, workerGroup);
+ }
+ try {
+ b.channel(NioServerSocketChannel.class);
+ } catch (IllegalStateException e) {
+ LOG.trace("Not overriding channelFactory on bootstrap {}", b, e);
+ }
+
// Bind and start to accept incoming connections.
final ChannelFuture f = b.bind(address);
LOG.debug("Initiated server {} at {}.", f, address);
// Bind and start to accept incoming connections.
final ChannelFuture f = b.bind(address);
LOG.debug("Initiated server {} at {}.", f, address);