8279329: Remove hardcoded IPv4 available policy on Windows

Reviewed-by: djelinski, alanb, dfuchs, aefimov
This commit is contained in:
Masanori Yano 2022-02-08 08:31:10 +00:00 committed by Alan Bateman
parent 4eacacb5ad
commit f2a9627c05

View File

@ -215,7 +215,12 @@ NET_GetFileDescriptorID(JNIEnv *env)
jint IPv4_supported()
{
/* TODO: properly check for IPv4 support on Windows */
SOCKET s = socket(AF_INET, SOCK_STREAM, 0);
if (s == INVALID_SOCKET) {
return JNI_FALSE;
}
closesocket(s);
return JNI_TRUE;
}