Log bind error (#5666)

This commit is contained in:
Michael Vines 2019-08-26 21:59:40 -07:00 committed by GitHub
parent 7257d2845d
commit d87910eb15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

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