Commit 1570c5a
committed
fix(tls): exit handshake loop on NOT_HANDSHAKING to kill latent busy-spin
The NEED_TASK branch reads sslEngine.getHandshakeStatus(), which per the JSSE
contract never returns FINISHED -- it returns NOT_HANDSHAKING once the handshake
completes. If a delegated task were the terminal handshake step, the loop would
land on NOT_HANDSHAKING, match no switch case, and busy-spin at 100% CPU with no
deadline escape. Exit the loop on NOT_HANDSHAKING (a completed handshake) as well
as FINISHED, closing this latent/provider-dependent spin path.1 parent e3e854d commit 1570c5a
1 file changed
Lines changed: 6 additions & 1 deletion
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
514 | 514 | | |
515 | 515 | | |
516 | 516 | | |
517 | | - | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
518 | 523 | | |
519 | 524 | | |
520 | 525 | | |
| |||
0 commit comments