Skip to content

Commit 430fb4c

Browse files
nobodyiambeiwei30
authored andcommittedMay 9, 2018
enable tcp no delay for netty 3 server (apache#1746)
1 parent b3a8f1c commit 430fb4c

File tree

1 file changed

+2
-1
lines changed
  • dubbo-remoting/dubbo-remoting-netty/src/main/java/com/alibaba/dubbo/remoting/transport/netty

1 file changed

+2
-1
lines changed
 

‎dubbo-remoting/dubbo-remoting-netty/src/main/java/com/alibaba/dubbo/remoting/transport/netty/NettyServer.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ protected void doOpen() throws Throwable {
7474
// https://issues.jboss.org/browse/NETTY-365
7575
// https://issues.jboss.org/browse/NETTY-379
7676
// final Timer timer = new HashedWheelTimer(new NamedThreadFactory("NettyIdleTimer", true));
77+
bootstrap.setOption("child.tcpNoDelay", true);
7778
bootstrap.setPipelineFactory(new ChannelPipelineFactory() {
7879
public ChannelPipeline getPipeline() {
7980
NettyCodecAdapter adapter = new NettyCodecAdapter(getCodec(), getUrl(), NettyServer.this);
@@ -153,4 +154,4 @@ public boolean isBound() {
153154
return channel.isBound();
154155
}
155156

156-
}
157+
}

0 commit comments

Comments
 (0)