diff --git a/src/main/java/org/jruby/ext/openssl/SSLSocket.java b/src/main/java/org/jruby/ext/openssl/SSLSocket.java index dd5cfe1d..cd1bc864 100644 --- a/src/main/java/org/jruby/ext/openssl/SSLSocket.java +++ b/src/main/java/org/jruby/ext/openssl/SSLSocket.java @@ -663,17 +663,14 @@ private void finishInitialHandshake() { session.putValue(SESSION_SOCKET_ID, getObjectId()); } } - + + // NOTE: gets called on negotiation connect/accept - not really on RE-negotiation as intended?! private void callRenegotiationCallback(final ThreadContext context) throws RaiseException { IRubyObject renegotiationCallback = sslContext.getInstanceVariable("@renegotiation_cb"); - if(renegotiationCallback == null || renegotiationCallback.isNil()) { - return; - } - else { - // the return of the Proc is not important - // Can throw ruby exception to "disallow" renegotiations - renegotiationCallback.callMethod(context, "call", this); - } + if (renegotiationCallback == null || renegotiationCallback.isNil()) return; + // the return of the Proc is not important + // Can throw ruby exception to "disallow" re-negotiations + renegotiationCallback.callMethod(context, "call", this); } public int write(ByteBuffer src, boolean blocking) throws SSLException, IOException {