Skip to content

Commit 52fb043

Browse files
donvkares
authored andcommitted
* Treat SSL NOT_HANDSHAKING as FINISHED.
1 parent cc0004a commit 52fb043

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/main/java/org/jruby/ext/openssl/SSLSocket.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,7 @@ private void doHandshake(boolean blocking) throws IOException {
418418

419419
switch (hsStatus) {
420420
case FINISHED:
421+
case NOT_HANDSHAKING:
421422
if ( initialHandshake ) finishInitialHandshake();
422423
return;
423424
case NEED_TASK:
@@ -444,9 +445,6 @@ private void doHandshake(boolean blocking) throws IOException {
444445
netData.flip();
445446
flushData(blocking);
446447
break;
447-
case NOT_HANDSHAKING:
448-
// Opposite side could close while unwrapping. Handle this as same as FINISHED
449-
return;
450448
default:
451449
throw new IllegalStateException("Unknown handshaking status: " + hsStatus);
452450
}

0 commit comments

Comments
 (0)