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 <noreply@anthropic.com>
This commit is contained in:
2026-02-11 21:16:08 +01:00
co-authored by Claude Opus 4.6
parent b9af725b02
commit 3f4c663242
+4 -1
View File
@@ -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