diff --git a/openssl/src/ssl/mod.rs b/openssl/src/ssl/mod.rs index 39dd80de4dbef0ab92eb3846d6707faad0e7c142..84d3613cb3cae1bd90387c84b6d9231b36ac3225 100644 --- a/openssl/src/ssl/mod.rs +++ b/openssl/src/ssl/mod.rs @@ -10,7 +10,7 @@ use std::mem; use std::str; use std::path::Path; use std::ptr; -use std::sync::{Once, ONCE_INIT, Mutex, Arc}; +use std::sync::{Mutex, Arc}; use std::cmp; use std::any::Any; #[cfg(any(feature = "npn", feature = "alpn"))] @@ -44,8 +44,7 @@ extern "C" { /// Manually initialize SSL. /// It is optional to call this function and safe to do so more than once. pub fn init() { - static mut INIT: Once = ONCE_INIT; - unsafe { INIT.call_once(|| ffi::init()); } + ffi::init(); } bitflags! {