Log bind error (#5666) (#5667)

automerge
This commit is contained in:
mergify[bot]
2019-08-26 22:54:14 -07:00
committed by Grimes
parent a0f9d968fe
commit c01789d2a8

View File

@@ -11,8 +11,8 @@ pub type IpEchoServer = Runtime;
/// connects. Used by |get_public_ip_addr|
pub fn ip_echo_server(port: u16) -> IpEchoServer {
let bind_addr = SocketAddr::from(([0, 0, 0, 0], port));
let tcp =
TcpListener::bind(&bind_addr).unwrap_or_else(|_| panic!("Unable to bind to {}", bind_addr));
let tcp = TcpListener::bind(&bind_addr)
.unwrap_or_else(|err| panic!("Unable to bind to {}: {}", bind_addr, err));
info!("bound to {:?}", bind_addr);
let server = tcp