Debug openhome

This commit is contained in:
2025-12-17 21:41:24 +01:00
parent 5f7ffe1bbe
commit 1a7e5dd790
22 changed files with 2015 additions and 447 deletions

View File

@@ -551,7 +551,13 @@ impl Server {
self.join_handle = Some(tokio::spawn(async move {
let server_future = async {
let r = router.read().await.clone();
let listener = tokio::net::TcpListener::bind(addr).await.unwrap();
let listener = match tokio::net::TcpListener::bind(addr).await {
Ok(l) => l,
Err(e) => {
error!("Failed to bind to {}: {}", addr, e);
panic!("Cannot start server: {}", e);
}
};
axum::serve(listener, r.into_make_service())
.with_graceful_shutdown(async move {