From 056f880a29b5c4af9dfc8d875a2f970e33256b84 Mon Sep 17 00:00:00 2001 From: EAimTY Date: Sat, 3 Jun 2023 20:39:23 +0900 Subject: [PATCH] timeout / locally closed for not-yet-opened stream --- tuic-server/src/connection/mod.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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}",