From 4636cb71b96785bc44004c77ec0034e7eca3b140 Mon Sep 17 00:00:00 2001 From: Michael Herger Date: Fri, 9 Feb 2018 21:51:56 +0100 Subject: [PATCH] Print more descriptive error message when we fail to bind zeroconf to the given port. --- discovery/src/discovery.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discovery/src/discovery.rs b/discovery/src/discovery.rs index e29a798a..24bf0e57 100644 --- a/discovery/src/discovery.rs +++ b/discovery/src/discovery.rs @@ -215,7 +215,7 @@ pub fn discovery(handle: &Handle, config: ConnectConfig, device_id: String, port let serve = { let http = Http::new(); debug!("Zeroconf server listening on 0.0.0.0:{}", port); - http.serve_addr_handle(&format!("0.0.0.0:{}", port).parse().unwrap(), &handle, move || Ok(discovery.clone())).unwrap() + http.serve_addr_handle(&format!("0.0.0.0:{}", port).parse().unwrap(), &handle, move || Ok(discovery.clone())).expect("Unable to bind Zeroconf to port") }; let s_port = serve.incoming_ref().local_addr().port();