Skip to content

Commit

Permalink
enable tcp no delay for netty 3 server (#1746)
Browse files Browse the repository at this point in the history
  • Loading branch information
nobodyiam authored and beiwei30 committed May 9, 2018
1 parent b3a8f1c commit 430fb4c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ protected void doOpen() throws Throwable {
// https://issues.jboss.org/browse/NETTY-365
// https://issues.jboss.org/browse/NETTY-379
// final Timer timer = new HashedWheelTimer(new NamedThreadFactory("NettyIdleTimer", true));
bootstrap.setOption("child.tcpNoDelay", true);
bootstrap.setPipelineFactory(new ChannelPipelineFactory() {
public ChannelPipeline getPipeline() {
NettyCodecAdapter adapter = new NettyCodecAdapter(getCodec(), getUrl(), NettyServer.this);
Expand Down Expand Up @@ -153,4 +154,4 @@ public boolean isBound() {
return channel.isBound();
}

}
}

0 comments on commit 430fb4c

Please sign in to comment.