diff --git a/tuic-server/src/connection/mod.rs b/tuic-server/src/connection/mod.rs index eacd2f5..3abe1a1 100644 --- a/tuic-server/src/connection/mod.rs +++ b/tuic-server/src/connection/mod.rs @@ -103,10 +103,9 @@ impl Connection { match handle_incoming.await { Ok(()) => {} - Err(err) if err.is_locally_closed() => {} - Err(err) if err.is_timeout_closed() => { + Err(err) if err.is_locally_closed() || err.is_timeout_closed() => { log::debug!( - "[{id:#010x}] [{addr}] [{user}] connection timeout", + "[{id:#010x}] [{addr}] [{user}] {err}", id = conn.id(), user = conn.auth, ); @@ -119,7 +118,9 @@ impl Connection { } } } - Err(err) if err.is_locally_closed() || err.is_timeout_closed() => unreachable!(), + Err(err) if err.is_locally_closed() || err.is_timeout_closed() => { + log::debug!("[{id:#010x}] [{addr}] [unauthenticated] {err}", id = 0); + } Err(err) => { log::warn!( "[{id:#010x}] [{addr}] [unauthenticated] connection establishing error: {err}",