From dc13044ca3eb7311cfc99e9ed28ab7abd22c2e3a Mon Sep 17 00:00:00 2001 From: monosans Date: Mon, 4 Aug 2025 16:38:49 +0300 Subject: [PATCH] fix: improve error handling in check_all function for better clarity --- src/checker.rs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/checker.rs b/src/checker.rs index 7c9abb0..f8fe6da 100644 --- a/src/checker.rs +++ b/src/checker.rs @@ -78,11 +78,14 @@ pub async fn check_all( } while let Some(res) = join_set.join_next().await { - if let Err(e) = res { - tracing::error!( - "proxy checking task panicked or was cancelled: {}", - e - ); + match res { + Ok(()) => {} + Err(e) if e.is_panic() => { + tracing::error!("proxy checking task panicked: {}", e); + } + Err(e) => { + return Err(e.into()); + } } }