mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Ensure Nagle is always off.
This commit is contained in:
@@ -88,6 +88,8 @@ abstract class AbstractChannelReplicator implements Closeable {
|
||||
|
||||
try {
|
||||
result = SocketChannel.open();
|
||||
result.socket().setTcpNoDelay(true);
|
||||
|
||||
} finally {
|
||||
if (result != null)
|
||||
try {
|
||||
|
||||
@@ -135,6 +135,8 @@ class StatelessChronicleMap<K, V> implements ChronicleMap<K, V>, Closeable {
|
||||
try {
|
||||
result = AbstractChannelReplicator.openSocketChannel(closeables);
|
||||
result.connect(builder.remoteAddress());
|
||||
result.socket().setTcpNoDelay(true);
|
||||
|
||||
doHandShaking(result);
|
||||
break;
|
||||
} catch (IOException e) {
|
||||
|
||||
@@ -754,7 +754,6 @@ final class TcpReplicator extends AbstractChannelReplicator implements Closeable
|
||||
socketChannel.socket().setReuseAddress(true);
|
||||
socketChannel.socket().setSoLinger(false, 0);
|
||||
socketChannel.socket().setSoTimeout(0);
|
||||
socketChannel.socket().setTcpNoDelay(true);
|
||||
|
||||
try {
|
||||
socketChannel.connect(details.address());
|
||||
|
||||
Reference in New Issue
Block a user