1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2025-01-02 05:18:44 +00:00

do not stop accept thread on error

This commit is contained in:
Nikolay Kim 2018-02-15 22:02:03 -08:00
parent 080bb3e5ae
commit 8607c51bcf

View file

@ -628,11 +628,11 @@ fn start_accept_thread(sock: net::TcpListener, addr: net::SocketAddr, backlog: i
.expect("worker thread died");
next = (next + 1) % workers.len();
},
Err(err) => if err.kind() == io::ErrorKind::WouldBlock {
Err(err) => {
if err.kind() != io::ErrorKind::WouldBlock {
error!("Error accepting connection: {:?}", err);
}
break
} else {
error!("Error accepting connection: {:?}", err);
return
}
}
}