Make connection backlog arg to listen a const

This commit is contained in:
Tim Kuehn
2017-01-08 17:34:44 -08:00
parent 200407a4c9
commit ef41d4349c

View File

@@ -60,7 +60,7 @@ pub fn listen_with<S, Req, Resp, E>(addr: SocketAddr,
fn listener(addr: &SocketAddr,
handle: &Handle) -> io::Result<TcpListener> {
const PENDING_CONNECTION_BACKLOG = 1024;
const PENDING_CONNECTION_BACKLOG: i32 = 1024;
match *addr {
SocketAddr::V4(_) => net2::TcpBuilder::new_v4(),