explicitly mem drop lazy init failure
This commit is contained in:
parent
4a36541570
commit
0db06fcabd
2 changed files with 6 additions and 4 deletions
|
@ -25,7 +25,7 @@ use crate::state::RwLockServerState;
|
|||
|
||||
pub const BASE64_CONFIG: base64::Config = base64::Config::new(base64::CharacterSet::UrlSafe, false);
|
||||
|
||||
static HTTP_CLIENT: Lazy<Client> = Lazy::new(|| Client::new());
|
||||
static HTTP_CLIENT: Lazy<Client> = Lazy::new(Client::new);
|
||||
|
||||
const SERVER_ID_STRING: &str = concat!(
|
||||
env!("CARGO_CRATE_NAME"),
|
||||
|
|
|
@ -102,9 +102,11 @@ impl ServerState {
|
|||
}
|
||||
|
||||
let tls = resp.tls.unwrap();
|
||||
let _ = TLS_PREVIOUSLY_CREATED.set(ArcSwap::from_pointee(tls.created_at));
|
||||
let _ = TLS_SIGNING_KEY.set(ArcSwap::new(tls.priv_key));
|
||||
let _ = TLS_CERTS.set(ArcSwap::from_pointee(tls.certs));
|
||||
std::mem::drop(
|
||||
TLS_PREVIOUSLY_CREATED.set(ArcSwap::from_pointee(tls.created_at)),
|
||||
);
|
||||
std::mem::drop(TLS_SIGNING_KEY.set(ArcSwap::new(tls.priv_key)));
|
||||
std::mem::drop(TLS_CERTS.set(ArcSwap::from_pointee(tls.certs)));
|
||||
|
||||
Ok(Self {
|
||||
precomputed_key: key,
|
||||
|
|
Loading…
Reference in a new issue