From 4e41347de88caba72c122272a086e89f4698f15e Mon Sep 17 00:00:00 2001 From: Anti Revoluzzer Date: Fri, 2 Mar 2018 22:57:11 -0800 Subject: [PATCH] move reuse_address before bind --- src/server/srv.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/srv.rs b/src/server/srv.rs index d886d4c59..e219049ba 100644 --- a/src/server/srv.rs +++ b/src/server/srv.rs @@ -697,7 +697,7 @@ fn create_tcp_listener(addr: net::SocketAddr, backlog: i32) -> io::Result TcpBuilder::new_v4()?, net::SocketAddr::V6(_) => TcpBuilder::new_v6()?, }; - builder.bind(addr)?; builder.reuse_address(true)?; + builder.bind(addr)?; Ok(builder.listen(backlog)?) }