--- a/src/java.base/share/classes/java/net/ServerSocket.java Tue Mar 05 10:02:36 2019 +0000
+++ b/src/java.base/share/classes/java/net/ServerSocket.java Sat Mar 09 12:49:54 2019 +0000
@@ -546,8 +546,13 @@
// Socket has no SocketImpl
if (si == null) {
- // create a SocketImpl and accept the connection
- si = Socket.createImpl();
+ // create a platform or custom SocketImpl and accept the connection
+ SocketImplFactory factory = Socket.socketImplFactory();
+ if (factory == null) {
+ si = SocketImpl.createPlatformSocketImpl(false);
+ } else {
+ si = factory.createSocketImpl();
+ }
implAccept(si);
// bind Socket to the SocketImpl and update socket state
s.setImpl(si);