adjust tracing and remove unused coding

This commit is contained in:
Marcel Märtens 2021-10-18 00:00:20 +02:00
parent 7148737252
commit 7ba45fa7e5
2 changed files with 10 additions and 15 deletions

View File

@ -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));

View File

@ -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),