diff --git a/jdk/src/java.base/windows/classes/java/net/PlainSocketImpl.java b/jdk/src/java.base/windows/classes/java/net/PlainSocketImpl.java index c5674e153d0..84dd3d4b515 100644 --- a/jdk/src/java.base/windows/classes/java/net/PlainSocketImpl.java +++ b/jdk/src/java.base/windows/classes/java/net/PlainSocketImpl.java @@ -80,7 +80,7 @@ class PlainSocketImpl extends AbstractPlainSocketImpl * Constructs an instance with the given file descriptor. */ PlainSocketImpl(FileDescriptor fd) { - if (useDualStackImpl) { + if (!preferIPv4Stack) { impl = new DualStackPlainSocketImpl(fd, exclusiveBind); } else { impl = new TwoStacksPlainSocketImpl(fd, exclusiveBind);