Skip to content

Commit

Permalink
Merge pull request #16 from carterkozak/ckozak/handshake_listener_vir…
Browse files Browse the repository at this point in the history
…tual_thread

8246039: SSLSocket HandshakeCompletedListeners are run on virtual threads
  • Loading branch information
AlanBateman authored Sep 20, 2020
2 parents f79b0bb + 2a3a844 commit 696e5a9
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -637,13 +637,11 @@ HandshakeStatus finishHandshake() {
!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();
Thread.builder()
.virtual()
.name("HandshakeCompletedNotify-Thread")
.task(new NotifyHandshake(sslConfig.handshakeListeners, hce))
.start();
}

return HandshakeStatus.FINISHED;
Expand Down

0 comments on commit 696e5a9

Please sign in to comment.