Hello,

please review the fix for OPENJDK6-38: java.net.Socket 
getTcpNoDelay/setTcpNoDelay work incorrectly on Windows

webrev: http://cr.openjdk.java.net/~vkarnauk/OPENJDK6-38/webrev.00/

The root cause of the issue is an incorrectly placed 'case' clauses for 
TCP_NODELAY and SO_OOBINLINE flags passed into the 
java.net.DualStackPlainSocketImpl.socketSetOption() function. This lead to 
incorrect fall-through, and the above flags actually never were set. Hence, 
consecutive calls to java.net.Socket setTcpNoRelay/getTcpNoRelay functions 
would never return expected values, and TCP_NODELAY flag is broken for Windows 
sockets.

According to mercurial history the bug was introduced in JDK7 by the fix for 
"7170730: Improve Windows network stack support" and later was fixed in JDK7 by 
the fix "8010213: Some api/javax_net/SocketFactory tests fail in 7u25 nightly 
build". However, 8010213 was never backported into OpenJDK6.

I fixed the bug independently from the fix 8010213, though the fixes are 
identical. I don't mind at all if my fix will be marked as a backport of 
8010213 for consistency.

Regards,
- Vlad

Reply via email to