diff options
author | iximeow <me@iximeow.net> | 2023-06-25 04:12:07 -0700 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2023-06-25 04:12:07 -0700 |
commit | 9bda7a16faf4526eaf9035ba1cb80ebf65fd7fd9 (patch) | |
tree | 6680a30db36c4a8b18ddd1d98f56980148eb8e56 /src | |
parent | a452f1713dfba190b7f1d9be219561e9267b6be7 (diff) |
fix deadlock when handling github push events
Diffstat (limited to 'src')
-rw-r--r-- | src/main.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index f4009bc..ab6b62c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -758,6 +758,8 @@ async fn main() { let web_config: WebserverConfig = serde_json::from_reader(std::fs::File::open(config_path).expect("file exists and is accessible")).expect("valid json for WebserverConfig"); let mut psks = PSKS.write().expect("can write lock"); *psks = web_config.psks.clone(); + // drop write lock so we can read PSKS elsewhere WITHOUT deadlocking. + std::mem::drop(psks); let config = RustlsConfig::from_pem_file( web_config.cert_path.clone(), |