From 9533ff419a24dd1fd066ccb14c26511bb80c1f41 Mon Sep 17 00:00:00 2001 From: megacz Date: Fri, 30 Jan 2004 07:42:41 +0000 Subject: [PATCH] 2003/12/10 01:18:07 darcs-hash:20040130074241-2ba56-fde865da3e23c98556a311b79d0e709e7e8d1a94.gz --- src/org/xwt/TinySSL.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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