src/java.base/share/classes/java/net/ServerSocket.java
branchniosocketimpl-branch
changeset 57248 48d523dfbdc9
parent 57242 c37938e150b7
child 57252 d70fc9bc1430
--- 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);