We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8c5766a commit b4fb6b3Copy full SHA for b4fb6b3
src/main/java/org/java_websocket/SSLSocketChannel2.java
@@ -190,6 +190,14 @@ private synchronized void processHandshake(boolean isReading) throws IOException
190
if (writeEngineResult.getHandshakeStatus() == HandshakeStatus.FINISHED) {
191
createBuffers(sslEngine.getSession());
192
return;
193
+ } else {
194
+ // processHandshake() can spin in a loop if a connection is made with no SSL handshake,
195
+ // throttle this by delaying 10ms to avoid consuming a CPU core.
196
+ try {
197
+ Thread.sleep(10);
198
+ } catch (InterruptedException e) {
199
+ // Ignore
200
+ }
201
}
202
203
assert (sslEngine.getHandshakeStatus()
0 commit comments