diff --git a/broker/build.gradle b/broker/build.gradle index f51dfe96..f3146dd5 100644 --- a/broker/build.gradle +++ b/broker/build.gradle @@ -27,6 +27,7 @@ dependencies { compile group: 'com.hazelcast', name: 'hazelcast', version:'3.5.4' compile group: 'org.slf4j', name: 'slf4j-api', version:'1.7.5' + compile group: 'org.slf4j', name: 'slf4j-log4j12', version:'1.7.5' testCompile group: 'org.fusesource.mqtt-client', name: 'mqtt-client', version:'1.12' testCompile group: 'org.eclipse.paho', name: 'org.eclipse.paho.client.mqttv3', version:'1.0.2' diff --git a/broker/src/main/java/io/moquette/server/netty/NettyAcceptor.java b/broker/src/main/java/io/moquette/server/netty/NettyAcceptor.java index 28b093ca..ad132f24 100644 --- a/broker/src/main/java/io/moquette/server/netty/NettyAcceptor.java +++ b/broker/src/main/java/io/moquette/server/netty/NettyAcceptor.java @@ -185,8 +185,10 @@ public class NettyAcceptor implements ServerAcceptor { throw th; } } - }).option(ChannelOption.SO_BACKLOG, nettySoBacklog).option(ChannelOption.SO_REUSEADDR, nettySoReuseaddr) - .option(ChannelOption.TCP_NODELAY, nettyTcpNodelay) + }) + .option(ChannelOption.SO_BACKLOG, nettySoBacklog) + .option(ChannelOption.SO_REUSEADDR, nettySoReuseaddr) + .childOption(ChannelOption.TCP_NODELAY, nettyTcpNodelay) .childOption(ChannelOption.SO_KEEPALIVE, nettySoKeepalive); try { LOG.info("Binding server. host={}, port={}", host, port); diff --git a/perf/src/main/java/io/moquette/parser/netty/performance/ProtocolDecodingServer.java b/perf/src/main/java/io/moquette/parser/netty/performance/ProtocolDecodingServer.java index 7860c534..456eb7f0 100644 --- a/perf/src/main/java/io/moquette/parser/netty/performance/ProtocolDecodingServer.java +++ b/perf/src/main/java/io/moquette/parser/netty/performance/ProtocolDecodingServer.java @@ -123,7 +123,7 @@ public class ProtocolDecodingServer { }) .option(ChannelOption.SO_BACKLOG, 128) .option(ChannelOption.SO_REUSEADDR, true) - .option(ChannelOption.TCP_NODELAY, true) + .childOption(ChannelOption.TCP_NODELAY, true) .childOption(ChannelOption.SO_KEEPALIVE, true); try { // Bind and start to accept incoming connections. diff --git a/perf/src/main/java/io/moquette/parser/netty/performance/ProtocolPublishDecodingServer.java b/perf/src/main/java/io/moquette/parser/netty/performance/ProtocolPublishDecodingServer.java index 228c77b4..0e7b61a8 100644 --- a/perf/src/main/java/io/moquette/parser/netty/performance/ProtocolPublishDecodingServer.java +++ b/perf/src/main/java/io/moquette/parser/netty/performance/ProtocolPublishDecodingServer.java @@ -71,7 +71,7 @@ public class ProtocolPublishDecodingServer { }) .option(ChannelOption.SO_BACKLOG, 128) .option(ChannelOption.SO_REUSEADDR, true) - .option(ChannelOption.TCP_NODELAY, true) + .childOption(ChannelOption.TCP_NODELAY, true) .childOption(ChannelOption.SO_KEEPALIVE, true); try { // Bind and start to accept incoming connections.