From afa62d4ab6b543c8a4d8e24aee6173930f1289b4 Mon Sep 17 00:00:00 2001 From: Skye Date: Sun, 14 May 2023 01:12:25 +0900 Subject: [PATCH] feat(server): more logging --- server/src/main.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/src/main.rs b/server/src/main.rs index f630fb2..44ef43a 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -364,6 +364,7 @@ async fn accept_minecraft_connection(mut stream: TcpStream) -> Result<()> { return Ok(()); } let handshake = Handshake::new(&packet?).await?; + info!("Minecraft client {} is connecting to {}", addr, handshake.server_address); if let Some(sender) = ROUTING_MAP.read().await.get(&handshake.server_address) { let mut handle = ChannelHandle::new(sender, addr).await?; let mut buf = vec![]; @@ -447,6 +448,7 @@ async fn get_random_domain() -> String { ); let map = ROUTING_MAP.read().await; while map.contains_key(&domain) { + warn!("Randomly selected domain {} conflicts; trying again", domain); domain = format!( "{}-{}.{}", wordlist::ID_WORDS.choose(&mut rand::thread_rng()).unwrap(),