Skip to content

Commit

Permalink
Load config on client connect (#401)
Browse files Browse the repository at this point in the history
  • Loading branch information
levkk authored Apr 11, 2023
1 parent d568739 commit 421c5d4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
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();
Expand All @@ -298,15 +298,15 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
shutdown_rx,
drain_tx,
admin_only,
tls_certificate.clone(),
tls_certificate,
config.general.log_client_connections,
)
.await
{
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,
Expand Down

0 comments on commit 421c5d4

Please sign in to comment.