Fixed #339, sets TCP_NODELAY options on the accepted child socket and not on the accepting
This commit is contained in:
@@ -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'
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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.
|
||||
|
||||
+1
-1
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user