On Thu, 16 Nov 2023 08:39:32 GMT, Matthias Baesken <[email protected]> wrote:

> There are a few places in the JDK C coding where the setsocktopt return value 
> is not handled but better should be handled.

src/java.base/windows/native/libnio/ch/Net.c line 160:

> 158: 
> 159:         /* IPV6_V6ONLY is true by default */
> 160:         /* attempt to disable IPV6_V6ONLY to ensure dual-socket support; 
> ignore errors */

You can the previous comment at L159.

src/java.base/windows/native/libnio/ch/WindowsAsynchronousServerSocketChannelImpl.c
 line 134:

> 132:     SOCKET s2 = (SOCKET)jlong_to_ptr(acceptSocket);
> 133: 
> 134:     if (setsockopt(s2, SOL_SOCKET, SO_UPDATE_ACCEPT_CONTEXT, (char 
> *)&s1, sizeof(s1)) < 0) {

I think this goes back to when the JDK targeted Windows releases where this 
wasn't supported or there were non-MS LSPs installed. It should be okay to 
change now.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/16684#discussion_r1395369394
PR Review Comment: https://git.openjdk.org/jdk/pull/16684#discussion_r1395368258

Reply via email to