Skip to content

Commit 9d9407e

Browse files
2foursDavidiusdadi
authored andcommitted
merged SSLSocketChannel2 fix (TooTallNate#153)
1 parent 390c403 commit 9d9407e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/java_websocket/SSLSocketChannel2.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ private synchronized ByteBuffer unwrap() throws SSLException {
134134
do {
135135
rem = inData.remaining();
136136
res = sslEngine.unwrap( inCrypt, inData );
137-
} while ( rem != inData.remaining() );
137+
} while ( res.getStatus() == SSLEngineResult.Status.OK && (rem != inData.remaining() || res.getHandshakeStatus() == HandshakeStatus.NEED_UNWRAP));
138138

139139
inData.flip();
140140
return inData;

0 commit comments

Comments
 (0)