From 7ba45fa7e5f380b5915964b0203b91a0b83f4e4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=A4rtens?= Date: Mon, 18 Oct 2021 00:00:20 +0200 Subject: [PATCH] adjust tracing and remove unused coding --- server-cli/src/main.rs | 19 ++++++++++--------- server/src/settings.rs | 6 ------ 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/server-cli/src/main.rs b/server-cli/src/main.rs index 72a7eac405..b2d3c043d1 100644 --- a/server-cli/src/main.rs +++ b/server-cli/src/main.rs @@ -170,22 +170,23 @@ fn main() -> io::Result<()> { ) .expect("Failed to create server instance!"); + let mut gameserver_addresses = vec![]; for protocol in protocols_and_addresses { - match protocol { - Protocol::Tcp { address } => { - info!(?address, "TCP socket is ready to accept connections."); - }, + gameserver_addresses.push(match protocol { + Protocol::Tcp { address } => ("TCP", address), Protocol::Quic { address, cert_file_path: _, key_file_path: _, - } => { - info!(?address, "QUIC socket is ready to accept connections."); - }, - } + } => ("QUIC", address), + }) } - info!(?metrics_port, "Server is ready to accept connections."); + info!( + ?metrics_port, + ?gameserver_addresses, + "Server is ready to accept connections." + ); let mut shutdown_coordinator = ShutdownCoordinator::new(Arc::clone(&sigusr1_signal)); diff --git a/server/src/settings.rs b/server/src/settings.rs index 60c3b81a25..ad17a09837 100644 --- a/server/src/settings.rs +++ b/server/src/settings.rs @@ -37,12 +37,6 @@ const BANLIST_FILENAME: &str = "banlist.ron"; const SERVER_DESCRIPTION_FILENAME: &str = "description.ron"; const ADMINS_FILENAME: &str = "admins.ron"; -#[derive(Clone, Debug, Serialize, Deserialize)] -pub struct X509FilePair { - pub cert: PathBuf, - pub key: PathBuf, -} - #[derive(Copy, Clone, Debug, Deserialize, Serialize)] pub enum ServerBattleMode { Global(BattleMode),