Imported Upstream version 5.18.0.191

Former-commit-id: 5001a414f0011a7347fc9a27cbb49980529fdeae
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-11-02 08:23:53 +00:00
parent 67a3e94435
commit 30f61da7aa
50 changed files with 48 additions and 45 deletions

View File

@ -75,6 +75,7 @@ namespace Mono
static int initialized;
static X509PalImpl x509pal;
static object syncRoot = new object ();
static void EnsureInitialized ()
{
@ -83,13 +84,15 @@ namespace Mono
* MonoTlsProviderFactory.InitializeInternal().
*
*/
if (Interlocked.CompareExchange (ref initialized, 1, 0) != 0)
return;
lock (syncRoot) {
if (Interlocked.CompareExchange (ref initialized, 1, 0) != 0)
return;
#if MONO_FEATURE_BTLS || MONO_FEATURE_APPLETLS
provider = MonoTlsProviderFactory.GetProvider ();
#endif
x509pal = GetX509Pal ();
x509pal = GetX509Pal ();
}
}
public X509PalImpl X509Pal {