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:
+4
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user