diff --git a/src/main/java/org/jruby/ext/openssl/SSLContext.java b/src/main/java/org/jruby/ext/openssl/SSLContext.java index 76380b5d..ddaa4711 100644 --- a/src/main/java/org/jruby/ext/openssl/SSLContext.java +++ b/src/main/java/org/jruby/ext/openssl/SSLContext.java @@ -339,11 +339,6 @@ public IRubyObject setup(final ThreadContext context) { if ( isFrozen() ) return runtime.getNil(); - synchronized(this) { - if ( isFrozen() ) return runtime.getNil(); - this.freeze(context); - } - final X509Store certStore = getCertStore(); // TODO: handle tmp_dh_callback : @@ -513,6 +508,8 @@ public IRubyObject setup(final ThreadContext context) { throw newSSLError(runtime, e); } + this.freeze(context); + return runtime.getTrue(); }