From fee59cd63c35d4b136f6a55f0030e13a1bbe4772 Mon Sep 17 00:00:00 2001 From: Lev Kokotov Date: Tue, 11 Apr 2023 10:27:48 -0700 Subject: [PATCH] Load config on client connect --- src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 39c67c2e..acd19352 100644 --- a/src/main.rs +++ b/src/main.rs @@ -287,7 +287,7 @@ fn main() -> Result<(), Box> { let drain_tx = drain_tx.clone(); let client_server_map = client_server_map.clone(); - let tls_certificate = config.general.tls_certificate.clone(); + let tls_certificate = get_config().general.tls_certificate.clone(); tokio::task::spawn(async move { let start = chrono::offset::Utc::now().naive_utc(); @@ -298,7 +298,7 @@ fn main() -> Result<(), Box> { shutdown_rx, drain_tx, admin_only, - tls_certificate.clone(), + tls_certificate, config.general.log_client_connections, ) .await @@ -306,7 +306,7 @@ fn main() -> Result<(), Box> { Ok(()) => { let duration = chrono::offset::Utc::now().naive_utc() - start; - if config.general.log_client_disconnections { + if get_config().general.log_client_disconnections { info!( "Client {:?} disconnected, session duration: {}", addr,