< prev index next >

src/java.base/share/classes/sun/security/ssl/TransportContext.java

Print this page
*** 635,17 ***
          if (transport instanceof SSLSocket &&
                  sslConfig.handshakeListeners != null &&
                  !sslConfig.handshakeListeners.isEmpty()) {
              HandshakeCompletedEvent hce =
                  new HandshakeCompletedEvent((SSLSocket)transport, conSession);
!             Thread thread = new Thread(
!                 null,
!                 new NotifyHandshake(sslConfig.handshakeListeners, hce),
!                 "HandshakeCompletedNotify-Thread",
-                 0,
-                 false);
-             thread.start();
          }
  
          return HandshakeStatus.FINISHED;
      }
  
--- 635,14 ---
          if (transport instanceof SSLSocket &&
                  sslConfig.handshakeListeners != null &&
                  !sslConfig.handshakeListeners.isEmpty()) {
              HandshakeCompletedEvent hce =
                  new HandshakeCompletedEvent((SSLSocket)transport, conSession);
!             Thread.ofVirtual()
!                     .name("HandshakeCompletedNotify-Thread")
!                     .inheritInheritableThreadLocals(false)
!                     .start(new NotifyHandshake(sslConfig.handshakeListeners, hce));
          }
  
          return HandshakeStatus.FINISHED;
      }
  
< prev index next >