8250886: java/net/DatagramSocket/SendReceiveMaxSize.java fails in timeout

SO_RCVBUF was previously set to match the SO_SNDBUF, however the kernel value for SO_RCVBUF is much larger. This mismatch caused the test to fail, and the fix removes this issue.

Reviewed-by: alanb, dfuchs
This commit is contained in:
Patrick Concannon 2020-08-07 20:39:10 +01:00
parent 9852a6f75c
commit c8c4d8377a
2 changed files with 2 additions and 8 deletions

View file

@ -908,13 +908,6 @@ Java_java_net_PlainDatagramSocketImpl_datagramSocketCreate(JNIEnv *env,
close(fd);
return;
}
if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF,
(char *)&arg, sizeof(arg)) < 0) {
getErrorString(errno, tmpbuf, sizeof(tmpbuf));
JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", tmpbuf);
close(fd);
return;
}
#endif /* __APPLE__ */
if (setsockopt(fd, SOL_SOCKET, SO_BROADCAST, (char*) &t, sizeof (int)) < 0) {