From 68d4c2f09b1e3de1dcd493856e7cfcd413a60eb2 Mon Sep 17 00:00:00 2001 From: kares Date: Sat, 2 Jul 2022 14:08:21 +0200 Subject: [PATCH] [refactor] no need to flush again, we just did it --- src/main/java/org/jruby/ext/openssl/SSLSocket.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }