diff options
Diffstat (limited to 'jurt/com/sun/star/lib/connections/socket/socketAcceptor.java')
-rw-r--r-- | jurt/com/sun/star/lib/connections/socket/socketAcceptor.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/jurt/com/sun/star/lib/connections/socket/socketAcceptor.java b/jurt/com/sun/star/lib/connections/socket/socketAcceptor.java index e3dbea71c14b..85790dfdd21e 100644 --- a/jurt/com/sun/star/lib/connections/socket/socketAcceptor.java +++ b/jurt/com/sun/star/lib/connections/socket/socketAcceptor.java @@ -28,9 +28,7 @@ import com.sun.star.lang.XSingleServiceFactory; import com.sun.star.registry.XRegistryKey; import java.io.IOException; -import java.net.InetAddress; -import java.net.ServerSocket; -import java.net.Socket; +import java.net.*; /** * A component that implements the <code>XAcceptor</code> interface. @@ -152,7 +150,9 @@ public final class socketAcceptor implements XAcceptor { System.err.println("##### " + getClass().getName() + ".accept: accepted " + socket); } - if (tcpNoDelay != null) { + // we enable tcpNoDelay for loopback connections because + // it can make a significant speed difference on linux boxes. + if (tcpNoDelay != null || ((InetSocketAddress)socket.getRemoteSocketAddress()).getAddress().isLoopbackAddress()) { socket.setTcpNoDelay(tcpNoDelay.booleanValue()); } return new SocketConnection(acceptingDescription, socket); |