diff --git a/src/main/java/org/jruby/ext/openssl/SSLSocket.java b/src/main/java/org/jruby/ext/openssl/SSLSocket.java index f5ab5539..ee0eec6f 100644 --- a/src/main/java/org/jruby/ext/openssl/SSLSocket.java +++ b/src/main/java/org/jruby/ext/openssl/SSLSocket.java @@ -591,7 +591,7 @@ private IRubyObject doHandshake(final boolean blocking, final boolean exception) netWriteData.compact(); netWriteData = Utils.ensureCapacity(netWriteData, engine.getSession().getPacketBufferSize()); netWriteData.flip(); - if (handshakeStatus != SSLEngineResult.HandshakeStatus.NEED_UNWRAP || flushData(blocking)) { + if (handshakeStatus != SSLEngineResult.HandshakeStatus.NEED_UNWRAP) { sel = waitSelect(SelectionKey.OP_WRITE, blocking, exception); if ( sel instanceof IRubyObject ) return (IRubyObject) sel; // :wait_writeable }