From: megacz Date: Fri, 30 Jan 2004 07:42:41 +0000 (+0000) Subject: 2003/12/10 01:18:07 X-Git-Tag: RC3~278 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=9533ff419a24dd1fd066ccb14c26511bb80c1f41;p=org.ibex.core.git 2003/12/10 01:18:07 darcs-hash:20040130074241-2ba56-fde865da3e23c98556a311b79d0e709e7e8d1a94.gz --- diff --git a/src/org/xwt/TinySSL.java b/src/org/xwt/TinySSL.java index cf9f901..db082fa 100644 --- a/src/org/xwt/TinySSL.java +++ b/src/org/xwt/TinySSL.java @@ -165,6 +165,12 @@ public class TinySSL extends Socket { public TinySSL(String host, int port, boolean negotiateImmediately) throws IOException { this(host, port, negotiateImmediately, false); } public TinySSL(String host, int port, boolean negotiateImmediately, boolean ignoreUntrustedCert) throws IOException { super(host, port); + if (!initializationFinished) { + synchronized(TinySSL.class) { + while (!initializationFinished) + try { TinySSL.class.wait(); } catch (Exception e) { } + } + } hostname = host; this.ignoreUntrustedCert = ignoreUntrustedCert; if (negotiateImmediately) negotiate(); @@ -1522,8 +1528,8 @@ public class TinySSL extends Socket { } } + private static volatile boolean initializationFinished = false; static { - entropySpinner[] spinners = new entropySpinner[10]; for(int i=0; i