From 4544d10c3833b05a5cdb653e8ba59749f09430f1 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 11 Nov 2024 11:19:11 +0000 Subject: cid#1556282 silence Unguarded read MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: If95e72b324378b334e106c9cb78e8e198f819573 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178451 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- ridljar/com/sun/star/lib/connections/socket/socketAcceptor.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ridljar') diff --git a/ridljar/com/sun/star/lib/connections/socket/socketAcceptor.java b/ridljar/com/sun/star/lib/connections/socket/socketAcceptor.java index 4000a1d0a463..199232e6d9c7 100644 --- a/ridljar/com/sun/star/lib/connections/socket/socketAcceptor.java +++ b/ridljar/com/sun/star/lib/connections/socket/socketAcceptor.java @@ -114,6 +114,7 @@ public final class socketAcceptor implements XAcceptor { com.sun.star.lang.IllegalArgumentException { ServerSocket serv; + Boolean noDelay = null; synchronized (this) { if (server == null) { ConnectionDescriptor desc @@ -142,6 +143,7 @@ public final class socketAcceptor implements XAcceptor { + " vs. " + connectionDescription); } + noDelay = tcpNoDelay; serv = server; } Socket socket = null; @@ -153,8 +155,8 @@ public final class socketAcceptor implements XAcceptor { } // we enable tcpNoDelay for loopback connections because // it can make a significant speed difference on linux boxes. - if (tcpNoDelay != null) { - socket.setTcpNoDelay(tcpNoDelay.booleanValue()); + if (noDelay != null) { + socket.setTcpNoDelay(noDelay.booleanValue()); } else { InetSocketAddress address = (InetSocketAddress)socket.getRemoteSocketAddress(); -- cgit