HBASE-11492 The servers do not honor the tcpNoDelay option
This commit is contained in:
parent
4f3d5bbab9
commit
79676f15f4
|
@ -30,6 +30,7 @@ import java.net.InetSocketAddress;
|
||||||
import java.net.ServerSocket;
|
import java.net.ServerSocket;
|
||||||
import java.net.Socket;
|
import java.net.Socket;
|
||||||
import java.net.SocketException;
|
import java.net.SocketException;
|
||||||
|
import java.net.StandardSocketOptions;
|
||||||
import java.net.UnknownHostException;
|
import java.net.UnknownHostException;
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.nio.channels.CancelledKeyException;
|
import java.nio.channels.CancelledKeyException;
|
||||||
|
@ -752,7 +753,7 @@ public class RpcServer implements RpcServerInterface {
|
||||||
while ((channel = server.accept()) != null) {
|
while ((channel = server.accept()) != null) {
|
||||||
try {
|
try {
|
||||||
channel.configureBlocking(false);
|
channel.configureBlocking(false);
|
||||||
channel.socket().setTcpNoDelay(tcpNoDelay);
|
channel.setOption(StandardSocketOptions.TCP_NODELAY, tcpNoDelay);
|
||||||
channel.socket().setKeepAlive(tcpKeepAlive);
|
channel.socket().setKeepAlive(tcpKeepAlive);
|
||||||
} catch (IOException ioe) {
|
} catch (IOException ioe) {
|
||||||
channel.close();
|
channel.close();
|
||||||
|
|
Loading…
Reference in New Issue