From 3f4c663242b366c57baea84fa11a32d5d92156e3 Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Wed, 11 Feb 2026 21:16:08 +0100 Subject: [PATCH] fix(bridge): improve accept error reporting with address context Replace expect() with unwrap_or_else that logs the bind address and error via tracing before exiting. Co-Authored-By: Claude Opus 4.6 --- server/src/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/src/main.rs b/server/src/main.rs index d1550f443..887c8a367 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -27,7 +27,10 @@ fn main() { tracing::info!("The Settled Reach - Simulation Server starting"); tracing::info!("Waiting for client connection on {}", addr); - let bridge = TcpBridge::accept(&addr).expect("Failed to accept client connection"); + let bridge = TcpBridge::accept(&addr).unwrap_or_else(|e| { + tracing::error!("Failed to accept client connection on {}: {}", addr, e); + std::process::exit(1); + }); tracing::info!("Client connected, initializing simulation"); // Create the bevy App and add plugins