1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-11-28 09:42:40 +01: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"); .expect("worker thread died");
next = (next + 1) % workers.len(); next = (next + 1) % workers.len();
}, },
Err(err) => if err.kind() == io::ErrorKind::WouldBlock { Err(err) => {
break if err.kind() != io::ErrorKind::WouldBlock {
} else {
error!("Error accepting connection: {:?}", err); error!("Error accepting connection: {:?}", err);
return }
break
} }
} }
} }