Skip to content

Commit

Permalink
discover: log the actual HTTP port that is used.
Browse files Browse the repository at this point in the history
If the default port is used (i.e. no command line argument specified),
this logging incorrectly reports the server is running at port 0.
  • Loading branch information
kingosticks committed Mar 13, 2019
1 parent 4c1562f commit 83bfdff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion connect/src/discovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ pub fn discovery(

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,
Expand All @@ -240,6 +239,7 @@ pub fn discovery(
};

let s_port = serve.incoming_ref().local_addr().port();
debug!("Zeroconf server listening on 0.0.0.0:{}", s_port);

let server_future = {
let handle = handle.clone();
Expand Down

0 comments on commit 83bfdff

Please sign in to comment.